Return with the process locked, caller expects p still locked after
the call. Reported and tested by: bapt Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
6be4cf2244
commit
4b685a2862
@ -239,13 +239,13 @@ reap_kill(struct thread *td, struct proc *p, struct procctl_reaper_kill *rk)
|
|||||||
int error, error1;
|
int error, error1;
|
||||||
|
|
||||||
sx_assert(&proctree_lock, SX_LOCKED);
|
sx_assert(&proctree_lock, SX_LOCKED);
|
||||||
PROC_UNLOCK(p);
|
|
||||||
if (IN_CAPABILITY_MODE(td))
|
if (IN_CAPABILITY_MODE(td))
|
||||||
return (ECAPMODE);
|
return (ECAPMODE);
|
||||||
if (rk->rk_sig <= 0 || rk->rk_sig > _SIG_MAXSIG)
|
if (rk->rk_sig <= 0 || rk->rk_sig > _SIG_MAXSIG)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
if ((rk->rk_flags & ~REAPER_KILL_CHILDREN) != 0)
|
if ((rk->rk_flags & ~REAPER_KILL_CHILDREN) != 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
PROC_UNLOCK(p);
|
||||||
reap = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p;
|
reap = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p;
|
||||||
ksiginfo_init(&ksi);
|
ksiginfo_init(&ksi);
|
||||||
ksi.ksi_signo = rk->rk_sig;
|
ksi.ksi_signo = rk->rk_sig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user