git: e6e9b3d7361a - stable/13 - reaper_abandon_children(): upgrade proctree_lock assert to exclusive

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 24 Jun 2022 19:36:45 UTC
The branch stable/13 has been updated by kib:

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

commit e6e9b3d7361a4abf666ccc53a08da26d51934b10
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-04-26 14:44:48 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-06-24 14:45:44 +0000

    reaper_abandon_children(): upgrade proctree_lock assert to exclusive
    
    (cherry picked from commit b9294a3e152b2524497678c8089e2c4abbdceb31)
---
 sys/kern/kern_exit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 09bad7873ff5..27c7f00130f8 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -136,7 +136,7 @@ reaper_abandon_children(struct proc *p, bool exiting)
 {
 	struct proc *p1, *p2, *ptmp;
 
-	sx_assert(&proctree_lock, SX_LOCKED);
+	sx_assert(&proctree_lock, SX_XLOCKED);
 	KASSERT(p != initproc, ("reaper_abandon_children for initproc"));
 	if ((p->p_treeflag & P_TREE_REAPER) == 0)
 		return;