Commit e6116533 authored by Russell King's avatar Russell King

[ARM] Fix ARM signal handling.

If we are unable to deliver a signal to the process (eg, due to stack
pointer corruption) block the signal so other fatal signals can kill
off the process.
parent 0db87bc9
...@@ -497,11 +497,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, ...@@ -497,11 +497,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
*/ */
ret |= !valid_user_regs(regs); ret |= !valid_user_regs(regs);
if (ret == 0) { /*
if (ka->sa.sa_flags & SA_ONESHOT) * Block the signal if we were unsuccessful.
ka->sa.sa_handler = SIG_DFL; */
if (ret != 0 || !(ka->sa.sa_flags & SA_NODEFER)) {
if (!(ka->sa.sa_flags & SA_NODEFER)) {
spin_lock_irq(&tsk->sighand->siglock); spin_lock_irq(&tsk->sighand->siglock);
sigorsets(&tsk->blocked, &tsk->blocked, sigorsets(&tsk->blocked, &tsk->blocked,
&ka->sa.sa_mask); &ka->sa.sa_mask);
...@@ -509,6 +508,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, ...@@ -509,6 +508,10 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&tsk->sighand->siglock); spin_unlock_irq(&tsk->sighand->siglock);
} }
if (ret == 0) {
if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL;
return; return;
} }
......
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