[PATCH] sys_signal: initialize ->sa_mask

From: Oleg Nesterov
Date: Thu Feb 09 2006 - 13:22:45 EST


Pointed out by Linus Torvalds.

sys_signal() forgets to initialize ->sa_mask.

( I suspect arch/ia64/ia32/ia32_signal.c:sys32_signal()
also needs this fix )

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- RC-1/kernel/signal.c~ 2006-02-01 23:38:20.000000000 +0300
+++ RC-1/kernel/signal.c 2006-02-09 23:17:54.000000000 +0300
@@ -2702,6 +2702,7 @@ sys_signal(int sig, __sighandler_t handl

new_sa.sa.sa_handler = handler;
new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK;
+ sigemptyset(&new_sa.sa.sa_mask);

ret = do_sigaction(sig, &new_sa, &old_sa);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/