Do not leak process lock when current thread is not allowed to see target.
Bumped into by: ed MFC after: 3 days
This commit is contained in:
parent
75fb535394
commit
d07dc8e3eb
@ -349,8 +349,10 @@ filt_procattach(struct knote *kn)
|
||||
|
||||
if (p == NULL)
|
||||
return (ESRCH);
|
||||
if ((error = p_cansee(curthread, p)))
|
||||
if ((error = p_cansee(curthread, p))) {
|
||||
PROC_UNLOCK(p);
|
||||
return (error);
|
||||
}
|
||||
|
||||
kn->kn_ptr.p_proc = p;
|
||||
kn->kn_flags |= EV_CLEAR; /* automatically set */
|
||||
|
Loading…
Reference in New Issue
Block a user