summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-03-08 15:48:06 +0000
committerrwatson <rwatson@FreeBSD.org>2008-03-08 15:48:06 +0000
commit32931f304a0112122036aa12b02a554e8e9bf687 (patch)
tree37c351818aeafdbd7bb1861ae99f0193204cd9b5 /sys/kern/kern_sig.c
parent562d4784be017a2d3de01e85bfe2ff8bbc68d2ab (diff)
downloadFreeBSD-src-32931f304a0112122036aa12b02a554e8e9bf687.zip
FreeBSD-src-32931f304a0112122036aa12b02a554e8e9bf687.tar.gz
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.
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 2e81a18..2f61001 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
OpenPOWER on IntegriCloud