Commit f6adb9a6aec0ec9540e15f354e5cdec88b2aea33
Committed by
Linus Torvalds
1 parent
6629326b89
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 2 additions and 6 deletions Side-by-side Diff
arch/um/kernel/signal.c
... | ... | @@ -65,13 +65,9 @@ |
65 | 65 | #endif |
66 | 66 | err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset); |
67 | 67 | |
68 | - if (err) { | |
69 | - spin_lock_irq(¤t->sighand->siglock); | |
70 | - current->blocked = *oldset; | |
71 | - recalc_sigpending(); | |
72 | - spin_unlock_irq(¤t->sighand->siglock); | |
68 | + if (err) | |
73 | 69 | force_sigsegv(signr, current); |
74 | - } else { | |
70 | + else { | |
75 | 71 | spin_lock_irq(¤t->sighand->siglock); |
76 | 72 | sigorsets(¤t->blocked, ¤t->blocked, |
77 | 73 | &ka->sa.sa_mask); |