um: Fix get_signal() usage
authorRichard Weinberger <richard@nod.at>
Wed, 18 Nov 2015 08:37:15 +0000 (09:37 +0100)
committerRichard Weinberger <richard@nod.at>
Tue, 8 Dec 2015 21:23:30 +0000 (22:23 +0100)
If get_signal() returns us a signal to post
we must not call it again, otherwise the already
posted signal will be overridden.
Before commit a610d6e672d this was the case as we stopped
the while after a successful handle_signal().

Cc: <stable@vger.kernel.org> # 3.10-
Fixes: a610d6e672d ("pull clearing RESTORE_SIGMASK into block_sigmask()")
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/signal.c

index 57acbd67d85dbd4051cd3c534ceff2a300ce9906..fc8be0e3a4ff879a2cf9fddc8e017dfa974ffc95 100644 (file)
@@ -69,7 +69,7 @@ void do_signal(struct pt_regs *regs)
        struct ksignal ksig;
        int handled_sig = 0;
 
-       while (get_signal(&ksig)) {
+       if (get_signal(&ksig)) {
                handled_sig = 1;
                /* Whee!  Actually deliver the signal.  */
                handle_signal(&ksig, regs);