Skip to content

Commit

Permalink
sh: Fix sigmask trampling in signal delivery.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ryusuke Sakato authored and Paul Mundt committed Mar 5, 2007
1 parent 9432f96 commit c8bfa1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/sh/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down

0 comments on commit c8bfa1f

Please sign in to comment.