From 8ad802d82c239e7320a2bc8195caedc7d3d1e56f Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 9 Feb 2001 16:43:18 +0000 Subject: 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(). --- sys/kern/kern_exit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys') diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 71e6288215e6..24a475388d5c 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -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; } -- cgit v1.3