aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2008-03-08 15:48:06 +0000
committerRobert Watson <rwatson@FreeBSD.org>2008-03-08 15:48:06 +0000
commiteeccc36738419fbdba2605f9a49fb52df3d34ba5 (patch)
tree37c351818aeafdbd7bb1861ae99f0193204cd9b5 /sys/kern/kern_sig.c
parentd940a8934c4a1a8f425c7478c24897761ef93cb1 (diff)
downloadsrc-eeccc36738419fbdba2605f9a49fb52df3d34ba5.tar.gz
src-eeccc36738419fbdba2605f9a49fb52df3d34ba5.zip
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.
Notes
Notes: svn path=/head/; revision=176935
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 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