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().
This commit is contained in:
John Baldwin 2001-02-09 16:43:18 +00:00
parent a9623898b8
commit 8ad802d82c

View File

@ -521,8 +521,10 @@ loop:
*/
PROC_LOCK(p);
if (--p->p_cred->p_refcnt == 0) {
PROC_UNLOCK(p);
crfree(p->p_ucred);
uifree(p->p_cred->p_uidinfo);
PROC_LOCK(p);
FREE(p->p_cred, M_SUBPROC);
p->p_cred = NULL;
}