tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: possible lwp_lock() issue



On Wed, Jul 02, 2008 at 10:07:25PM +0200, Manuel Bouyer wrote:

> Now the question:
> in lwp_lock(), we call lwp_lock_retry() if l->l_mutex got changed while 
> tacking
> the lock. But we do it only if LOCKDEBUG || MULTIPROCESSOR, we do a simple
> mutex_spin_enter() otherwise (i.e. in a XEN3_DOM0 kernel). Are we sure
> l->l_mutex can't be changed in this case ? The panic I'm getting seems to
> prove it can be changed ...

Yes, it can still be changed if something at a higher IPL interrupts between
the load of l_mutex and the call to mutex_spin_enter(). I'm surprised the
ifdefs are there, I checked all the uses of LOCKDEBUG and MULTIPROCESSOR a
while back. I'll get rid of them.

Andrew


Home | Main Index | Thread Index | Old Index