mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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 <sakato@hsdv.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
9432f96803
commit
c8bfa1fdc8
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue