aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2019-04-07 14:26:14 +0000
committerMark Johnston <markj@FreeBSD.org>2019-04-07 14:26:14 +0000
commit128c9bc05baf1fa69638707801ede25ae7466b0d (patch)
tree55ad961c796c168419b444fcd202b16e3a2cf327 /sys/kern/kern_exit.c
parent0dc2db13ec7c16eabe15c18d6d3a49c4c77b2007 (diff)
downloadsrc-128c9bc05baf1fa69638707801ede25ae7466b0d.tar.gz
src-128c9bc05baf1fa69638707801ede25ae7466b0d.zip
Notes
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 29016ca380a2..5027182875d5 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -543,6 +543,11 @@ exit1(struct thread *td, int rval, int signo)
*/
while ((q = LIST_FIRST(&p->p_orphans)) != NULL) {
PROC_LOCK(q);
+ KASSERT(q->p_oppid == p->p_pid,
+ ("orphan %p of %p has unexpected oppid %d", q, p,
+ q->p_oppid));
+ q->p_oppid = q->p_reaper->p_pid;
+
/*
* If we are the real parent of this process
* but it has been reparented to a debugger, then