Messages in this thread | | | Subject | Re: Dumb question: BKL on reboot ? | From | Dave Hansen <> | Date | 20 Aug 2003 13:23:44 -0700 |
| |
On Wed, 2003-08-20 at 11:35, David S. Miller wrote: > On Wed, 20 Aug 2003 11:29:18 -0700 > Andrew Morton <akpm@osdl.org> wrote: > > > Where exactly does the rebooting CPU get stuck in machine_restart()? If > > someone has done lock_kernel() with local interrupts disabled then yes, > > it'll deadlock. But that's unlikely? Confused.
I thought it was legal to do that. The normal interrupts-off spinlock deadlock happens because a thread does a spin_lock() with no irq disable, then gets interrupted. The interrupt handler tries to take the lock, and gets stuck.
If the BKL is put in that situation, the interrupt handler will see current->lock_depth > 0, and not actually take the spinlock; it will just increment the lock_depth. It won't deadlock.
Or, are you saying that a CPU could have the BKL, and have stop_this_cpu() called on it? I guess we could add release_kernel_lock() to stop_this_cpu(). -- Dave Hansen haveblue@us.ibm.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |