In Rev 1.296 the update of the siglist was moved to the end of ptsignal().
authorclaudio <claudio@openbsd.org>
Tue, 7 May 2024 10:46:35 +0000 (10:46 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 7 May 2024 10:46:35 +0000 (10:46 +0000)
One atomic_clearbits_int() hiding in SSTOP was missed when converting all
the exceptions that cleared the siglist again. Instead of clearing the bits
the mask needs to be set to 0 so that it is properly ignored.
OK mpi@

sys/kern/kern_sig.c

index 2280bc7..1a022be 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_sig.c,v 1.325 2024/04/18 09:06:42 claudio Exp $  */
+/*     $OpenBSD: kern_sig.c,v 1.326 2024/05/07 10:46:35 claudio Exp $  */
 /*     $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $   */
 
 /*
@@ -1171,7 +1171,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
                        atomic_clearbits_int(&p->p_flag, P_SUSPSIG);
                        wakeparent = 1;
                        if (action == SIG_DFL)
-                               atomic_clearbits_int(siglist, mask);
+                               mask = 0;
                        if (action == SIG_CATCH)
                                goto runfast;
                        if (p->p_wchan == NULL)