Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 2021 22:31:09 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cdb79e2e08c2 - stable/13 - Move sv_onexit() sysentvec hook slightly later
Message-ID:  <202107212231.16LMV9hq089906@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

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

commit cdb79e2e08c226149473393fc7d59af574152823
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-07-01 18:06:42 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-07-21 22:11:52 +0000

    Move sv_onexit() sysentvec hook slightly later
    
    (cherry picked from commit 55976ce11a10765dee6c71b7ed6eac016bd560ef)
---
 sys/kern/kern_exit.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index fcd8b39a8ee2..515c2d4e6397 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -340,9 +340,6 @@ exit1(struct thread *td, int rval, int signo)
 
 	itimers_exit(p);
 
-	if (p->p_sysent->sv_onexit != NULL)
-		p->p_sysent->sv_onexit(p);
-
 	/*
 	 * Check if any loadable modules need anything done at process exit.
 	 * E.g. SYSV IPC stuff.
@@ -374,6 +371,8 @@ exit1(struct thread *td, int rval, int signo)
 	PROC_UNLOCK(p);
 
 	umtx_thread_exit(td);
+	if (p->p_sysent->sv_onexit != NULL)
+		p->p_sysent->sv_onexit(p);
 	seltdfini(td);
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107212231.16LMV9hq089906>