From: Al Viro Date: Fri, 27 Apr 2012 03:25:06 +0000 (-0400) Subject: um: wrong sigmask saved in case of multiple sigframes X-Git-Tag: v3.5-rc1~133^2^2~4 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=5a30a798fb501429522a30b6027a603244d659b2;p=~andy%2Flinux um: wrong sigmask saved in case of multiple sigframes we can't just find oldmask once; if there are multiple signals and we loop building sigframes for those, ->saved_mask will be definitely wrong for all but the first one. Signed-off-by: Al Viro --- diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index 0dfcef92ec9..187118fbe1b 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c @@ -74,15 +74,14 @@ static int kern_do_signal(struct pt_regs *regs) { struct k_sigaction ka_copy; siginfo_t info; - sigset_t *oldset; int sig, handled_sig = 0; - if (test_thread_flag(TIF_RESTORE_SIGMASK)) - oldset = ¤t->saved_sigmask; - else - oldset = ¤t->blocked; - while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) { + sigset_t *oldset; + if (test_thread_flag(TIF_RESTORE_SIGMASK)) + oldset = ¤t->saved_sigmask; + else + oldset = ¤t->blocked; handled_sig = 1; /* Whee! Actually deliver the signal. */ if (!handle_signal(regs, sig, &ka_copy, &info, oldset)) {