git: b9294a3e152b - main - reaper_abandon_children(): upgrade proctree_lock assert to exclusive
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Apr 2022 23:27:48 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=b9294a3e152b2524497678c8089e2c4abbdceb31
commit b9294a3e152b2524497678c8089e2c4abbdceb31
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-04-26 14:44:48 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-04-27 23:27:34 +0000
reaper_abandon_children(): upgrade proctree_lock assert to exclusive
p_reapsibling linkage is protected by proctree_lock, and it is modified
there.
Suggested and reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D35014
---
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 7215aed60c83..0fc7a471f3f0 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;