diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-05-21 17:37:47 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-07-07 01:21:49 +0000 |
| commit | aa1694e23401762c661da11bbf9016a368d37fbe (patch) | |
| tree | 3260a5fc9c3b3cad5d86e7946dd169f94b933514 | |
| parent | d516e52373e1768ea84bf1ca220671a44f413abe (diff) | |
procdesc_exit(): assert that _exit() was called
Check that the P_WEXIT flag is set.
Requested by: markj
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57124
| -rw-r--r-- | sys/kern/sys_procdesc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index 9360ec147f8a..377132af13c3 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -294,6 +294,7 @@ procdesc_exit(struct proc *p) sx_assert(&proctree_lock, SA_XLOCKED); PROC_LOCK_ASSERT(p, MA_OWNED); KASSERT(p->p_procdesc != NULL, ("procdesc_exit: p_procdesc NULL")); + MPASS((p->p_flag & P_WEXIT) != 0); pd = p->p_procdesc; |
