Subject: Re: Final reaper removal patch
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 01/09/2004 19:01:00
> YAMAMOTO Takashi wrote:
> > lwp_exit2() should acquire kernel lock.  otherwise it deadlocks.
> I'm not sure. AFAICS it uses correct lock protocol.
> Normal lock order is:
> 2. other spinlocks
> The lwp_exit2() doesn't take KERNEL_PROC_LOCK(), only takes
> the other spinlocks. Thus, it shouldn't deadlock.
> Deadlock would be possible only if there would be any code
> path where lwp_exit2() acquires some others locks before
> taking KERNEL_PROC_LOCK. Right?

during it's holding a spinlock,
an interrupt which acquire kernel lock can occur.

an alternative solution, which is preferred of course, is
making all interrupt handlers biglock-free. :-)