kern_procctl.c: use td->td_proc instead of curproc
Suggested by: markj Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32513
This commit is contained in:
parent
f5bb6e5a6d
commit
3692877a6c
@ -136,7 +136,7 @@ reap_acquire(struct thread *td, struct proc *p, void *data __unused)
|
||||
{
|
||||
|
||||
sx_assert(&proctree_lock, SX_XLOCKED);
|
||||
if (p != curproc)
|
||||
if (p != td->td_proc)
|
||||
return (EPERM);
|
||||
if ((p->p_treeflag & P_TREE_REAPER) != 0)
|
||||
return (EBUSY);
|
||||
@ -153,7 +153,7 @@ reap_release(struct thread *td, struct proc *p, void *data __unused)
|
||||
{
|
||||
|
||||
sx_assert(&proctree_lock, SX_XLOCKED);
|
||||
if (p != curproc)
|
||||
if (p != td->td_proc)
|
||||
return (EPERM);
|
||||
if (p == initproc)
|
||||
return (EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user