summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-07-24 15:31:09 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-07-24 15:31:09 +0000
commit605c4c1b73349b04e22897053744b772b340fea4 (patch)
treebf63b81a569d8d56da180ca9ea56550114562976 /sys/kern/kern_sig.c
parent911b7b4512f45adc2ee412ff43f90316eff7549d (diff)
KASSERT that the ps_single proc has P_SUSPSINGLE cleared.
Requested by kettenis@ and guenther@
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 51879e9b973..a0d73ccaa95 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.333 2024/07/22 09:43:47 claudio Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.334 2024/07/24 15:31:08 claudio Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -2164,6 +2164,7 @@ single_thread_set(struct proc *p, int flags)
panic("single_thread_mode = %d", mode);
#endif
}
+ KASSERT((p->p_flag & P_SUSPSINGLE) == 0);
pr->ps_single = p;
pr->ps_singlecnt = pr->ps_threadcnt;
@@ -2233,6 +2234,7 @@ single_thread_wait(struct process *pr, int recheck)
if (!recheck)
break;
}
+ KASSERT((pr->ps_single->p_flag & P_SUSPSINGLE) == 0);
mtx_leave(&pr->ps_mtx);
return wait;