]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Fix sigmask trampling in signal delivery.
authorRyusuke Sakato <sakato@hsdv.com>
Fri, 23 Feb 2007 04:22:56 +0000 (13:22 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 5 Mar 2007 05:13:25 +0000 (14:13 +0900)
There was a missing return in do_signal() that caused the saved
sigmask to be written back after having successfully delivered
the signal.

Signed-off-by: Ryusuke Sakato <sakato@hsdv.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/signal.c

index 32f10a03fbb5e9388d27d1d889dffbff3df03b03..9f39ef1f73dae8402c115dd92e854fce972ff2f5 100644 (file)
@@ -589,6 +589,8 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
                        if (test_thread_flag(TIF_RESTORE_SIGMASK))
                                clear_thread_flag(TIF_RESTORE_SIGMASK);
                }
+
+               return;
        }
 
  no_signal:
@@ -598,7 +600,7 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
                if (regs->regs[0] == -ERESTARTNOHAND ||
                    regs->regs[0] == -ERESTARTSYS ||
                    regs->regs[0] == -ERESTARTNOINTR) {
-                       regs->regs[0] = save_r0;
+                       regs->regs[0] = save_r0;
                        regs->pc -= 2;
                } else if (regs->regs[0] == -ERESTART_RESTARTBLOCK) {
                        regs->pc -= 2;