mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 20:04:57 +01:00
proc_realparent(): assert that an orphaned child has real parent != parent
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D58504
This commit is contained in:
1 parent
ce6ab51fc3
commit
8cef3c9b76
1 file changed
+3
@@ -124,6 +124,9 @@ proc_realparent(struct proc *child)
|
||||
}
|
||||
parent = __containerof(p->p_orphan.le_prev, struct proc,
|
||||
p_orphans.lh_first);
|
||||
KASSERT(child->p_pptr != parent,
|
||||
("proc %d %p orphaned but parent %d %p is realparent",
|
||||
child->p_pid, child, parent->p_pid, parent));
|
||||
return (parent);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user