diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-03-23 15:01:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 16:58:31 -0700 |
commit | f6adb9a6aec0ec9540e15f354e5cdec88b2aea33 (patch) | |
tree | e0294accaec6c3ba56c19872d4c8ec38b158de8d /arch/um | |
parent | 6629326b89b6e69cc44276e1649a31158bb2c819 (diff) | |
download | blackbird-op-linux-f6adb9a6aec0ec9540e15f354e5cdec88b2aea33.tar.gz blackbird-op-linux-f6adb9a6aec0ec9540e15f354e5cdec88b2aea33.zip |
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/um')
-rw-r--r-- | arch/um/kernel/signal.c | 8 |
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, #endif err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); - if (err) { - spin_lock_irq(¤t->sighand->siglock); - current->blocked = *oldset; - recalc_sigpending(); - spin_unlock_irq(¤t->sighand->siglock); + if (err) force_sigsegv(signr, current); - } else { + else { spin_lock_irq(¤t->sighand->siglock); sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask); |