Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Jul 2026 01:57:10 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: aa1694e23401 - main - procdesc_exit(): assert that _exit() was called
Message-ID:  <6a4c5cf6.3eaf9.221eac22@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=aa1694e23401762c661da11bbf9016a368d37fbe

commit aa1694e23401762c661da11bbf9016a368d37fbe
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-05-21 17:37:47 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-07-07 01:21:49 +0000

    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
---
 sys/kern/sys_procdesc.c | 1 +
 1 file changed, 1 insertion(+)

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;
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a4c5cf6.3eaf9.221eac22>