In the big p_stat switch in ptsignal do not call return but instead
authorclaudio <claudio@openbsd.org>
Wed, 22 May 2024 09:22:55 +0000 (09:22 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 22 May 2024 09:22:55 +0000 (09:22 +0000)
use one of the gotos. In this case goto out with mask and prop set to 0.

OK jca@

sys/kern/kern_sig.c

index ae6a2be..a2a8f1b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_sig.c,v 1.328 2024/05/20 10:32:20 claudio Exp $  */
+/*     $OpenBSD: kern_sig.c,v 1.329 2024/05/22 09:22:55 claudio Exp $  */
 /*     $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $   */
 
 /*
@@ -1106,8 +1106,9 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
                                 */
                                if (prop & SA_TTYSTOP &&
                                    pr->ps_pgrp->pg_jobc == 0) {
-                                       SCHED_UNLOCK(s);
-                                       return;
+                                       mask = 0;
+                                       prop = 0;
+                                       goto out;
                                }
                        }
                }