Commit f6adb9a6 authored by Matt Fleming's avatar Matt Fleming Committed by Linus Torvalds

um: don't restore current->blocked on error

If we fail to setup the signal stack frame then we don't need to restore
current->blocked because it is not modified by setup_signal_stack_*.
Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarRichard Weinberger <richard@nod.at>
Tested-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6629326b
...@@ -65,13 +65,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr, ...@@ -65,13 +65,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
#endif #endif
err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
if (err) { if (err)
spin_lock_irq(&current->sighand->siglock);
current->blocked = *oldset;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
force_sigsegv(signr, current); force_sigsegv(signr, current);
} else { else {
spin_lock_irq(&current->sighand->siglock); spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked, &current->blocked, sigorsets(&current->blocked, &current->blocked,
&ka->sa.sa_mask); &ka->sa.sa_mask);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment