lkml.org 
[lkml]   [2003]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Dumb question: BKL on reboot ?
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:1.140 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site