From eeccc36738419fbdba2605f9a49fb52df3d34ba5 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 8 Mar 2008 15:48:06 +0000 Subject: [PATCH] Unlock the process lock when expand_name() fails, or we may leak the process lock leading to a hang. This bug was introduced in kern_sig.c:1.351, when the call to expand_name() was moved earlier bit this particular error case was not updated. --- sys/kern/kern_sig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 2e81a18c820d..2f61001ac498 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3063,6 +3063,7 @@ coredump(struct thread *td) name = expand_name(p->p_comm, td->td_ucred->cr_uid, p->p_pid); if (name == NULL) { + PROC_UNLOCK(p); #ifdef AUDIT audit_proc_coredump(td, NULL, EINVAL); #endif