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.
This commit is contained in:
parent
d940a8934c
commit
eeccc36738
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user