aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-03-23 18:01:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:31 -0400
commitf6adb9a6aec0ec9540e15f354e5cdec88b2aea33 (patch)
treee0294accaec6c3ba56c19872d4c8ec38b158de8d /arch
parent6629326b89b6e69cc44276e1649a31158bb2c819 (diff)
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: Oleg Nesterov <oleg@redhat.com> Acked-by: Richard Weinberger <richard@nod.at> Tested-by: Richard Weinberger <richard@nod.at> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/kernel/signal.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
index e8b889d3bce7..8382e0b91e8b 100644
--- a/arch/um/kernel/signal.c
+++ b/arch/um/kernel/signal.c
@@ -65,13 +65,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
65#endif 65#endif
66 err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); 66 err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
67 67
68 if (err) { 68 if (err)
69 spin_lock_irq(&current->sighand->siglock);
70 current->blocked = *oldset;
71 recalc_sigpending();
72 spin_unlock_irq(&current->sighand->siglock);
73 force_sigsegv(signr, current); 69 force_sigsegv(signr, current);
74 } else { 70 else {
75 spin_lock_irq(&current->sighand->siglock); 71 spin_lock_irq(&current->sighand->siglock);
76 sigorsets(&current->blocked, &current->blocked, 72 sigorsets(&current->blocked, &current->blocked,
77 &ka->sa.sa_mask); 73 &ka->sa.sa_mask);