mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 01:07:21 +01:00
reap_kill_proc(): avoid singlethreading any other process if we are exiting
This is racy because curproc process lock is not used, but allows the process to exit faster. It is userspace issue to create such race anyway, and not fullfilling the guarantee that all reaper descendants are signalled should be fine. In collaboration with: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D35310
This commit is contained in:
parent
e0343eacf3
commit
1575804961
@ -291,6 +291,7 @@ reap_kill_proc_locked(struct thread *td, struct proc *p2,
|
||||
* race.
|
||||
*/
|
||||
need_stop = p2 != td->td_proc &&
|
||||
(td->td_proc->p_flag2 & P2_WEXIT) == 0 &&
|
||||
(p2->p_flag & (P_KPROC | P_SYSTEM | P_STOPPED)) == 0 &&
|
||||
(rk->rk_flags & REAPER_KILL_CHILDREN) == 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user