From: Paul M. <le...@li...> - 2007-03-01 03:06:42
|
On Thu, Mar 01, 2007 at 11:52:41AM +0900, Hideo Saito wrote: > When '-ERESTARTNOINTR' is returned from fork syscall, do_signal() > subtracts 2 from the address that is handled by alarm signal. > This was already spotted and fixed in current git by Sakato-san, in the case where we actually have a signal we should simply be returning. I'll send this off for inclusion in the -stable tree. commit fade884146b44be85b0987c8357194a16ea72f90 Author: Ryusuke Sakato <sa...@hs...> Date: Fri Feb 23 13:22:56 2007 +0900 sh: Fix sigmask trampling in signal delivery. 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 <sa...@hs...> Signed-off-by: Paul Mundt <le...@li...> diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 32f10a0..9f39ef1 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c @@ -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; |