Re: [patch] fix netconsole hang with alt-sysrq-t
From: Muli Ben-Yehuda
Date: Thu Aug 12 2004 - 16:27:58 EST
On Thu, Aug 12, 2004 at 05:01:18PM -0400, Jeff Moyer wrote:
> So how do you want to deal with this case? We could do something like:
>
> int cpu = smp_processor_id();
That doesn't look right, unless I'm missing something, you could get
preempted here (between the smp_processor_id() and the
local_irq_save() and end up with 'cpu' pointing to the wrong CPU.
> local_irq_save(flags);
> if (!spin_trylock(&netpoll_poll_lock)) {
> /* allow recursive calls on this cpu */
> if (cpu != poll_owner)
> spin_lock(&netpoll_poll_lock);
> }
> poll_owner = cpu;
Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
Attachment:
signature.asc
Description: Digital signature