Resent-Date: Sat, 24 Jul 1999 16:10:44 +0200 (MET DST)
Date: Sat, 24 Jul 1999 16:08:43 +0200 (MET DST)
From: Roman Zippel <zippel@fh-brandenburg.de>
X-Sender: zippel@zeus
To: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: another signal bug fix
Resent-From: linux-m68k@phil.uni-sb.de

Hi,

I found another bug in the signal handling, this time it affects all
architectures so I already sent a similiar mail to Linus and the kernel
mailing list.
Anyway, if SA_NODEER was set for sigaction(), the whole sa_mask was
ignored and not only the sent signal.

bye, Roman

--- linux/arch/m68k/kernel/signal.c	1999/07/20 18:09:00	1.1.1.1.8.1
+++ linux/arch/m68k/kernel/ssignal.c	1999/07/24 10:27:37
@@ -934,11 +934,10 @@
 	if (ka->sa.sa_flags & SA_ONESHOT)
 		ka->sa.sa_handler = SIG_DFL;
 
-	if (!(ka->sa.sa_flags & SA_NODEFER)) {
-		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+	sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+	if (!(ka->sa.sa_flags & SA_NODEFER))
 		sigaddset(&current->blocked,sig);
-		recalc_sigpending(current);
-	}
+	recalc_sigpending(current);
 }
 
 /*


