diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2022-05-16 23:47:20 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2022-06-24 14:45:50 +0000 |
commit | 9a24a80a17be36eb63caeb9ef189b0ce0048246f (patch) | |
tree | 873a7ededc9ec6bd62c19e27a0a6905df5aeff39 | |
parent | b18df35be04213e6a603b54d404215a923fe66e2 (diff) | |
download | src-9a24a80a17be36eb63caeb9ef189b0ce0048246f.tar.gz src-9a24a80a17be36eb63caeb9ef189b0ce0048246f.zip |
reap_kill_proc(): avoid singlethreading any other process if we are exiting
Tested by: pho (whole series MFC)
(cherry picked from commit 1575804961d2ba1768c9a6b28438d364421718f3)
-rw-r--r-- | sys/kern/kern_procctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index b32a4156dafb..79725686bc44 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -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; |