提交 f6adb9a6 编写于 作者: M Matt Fleming 提交者: 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: NOleg Nesterov <oleg@redhat.com>
Acked-by: NRichard Weinberger <richard@nod.at>
Tested-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6629326b
......@@ -65,13 +65,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
#endif
err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
if (err) {
spin_lock_irq(&current->sighand->siglock);
current->blocked = *oldset;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
if (err)
force_sigsegv(signr, current);
} else {
else {
spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked, &current->blocked,
&ka->sa.sa_mask);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册