Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Feb 2001 11:14:16 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_exit.c
Message-ID:  <XFMail.010209111416.jhb@FreeBSD.org>
In-Reply-To: <20010209104215.H26076@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 09-Feb-01 Alfred Perlstein wrote:
> * John Baldwin <jhb@FreeBSD.org> [010209 10:18] wrote:
>> jhb         2001/02/09 08:43:18 PST
>> 
>>   Modified files:
>>     sys/kern             kern_exit.c 
>>   Log:
>>   Release the proc lock around crfree() and uifree() in wait1().  It leads
>>   to
>>   a lock order violation, and since p is already a zombie at this point,
>>   I'm not sure that we even need all the locking currently in wait1().
> 
> My first question was:
>   How does this lead to a lock order violation?
> 
> Then I realized it might be what happens if crfree/uifree call into
> free() which in turn calls into Giant?
> 
> It'd be helpful to explain in more detail what you found and fixed
> along with how and why.  I see everything but 'why' in detail and
> if you want others to be able to get it right (or find a flaw in
> your logic) you'll need to be more clear.

Ok.  I'm not entirely happy with it at hte moment.  However, the lock order
violation was that previously uidinfo was acquired before proc lock, but during
wait1(), proc lock was acquired prior to call uifree(), and uifree() called
uifind(), and the mtx_lock() of the uid hash table mutex triggered the cycle.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010209111416.jhb>