diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-04 03:53:27 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-04 03:53:27 -0700 |
| commit | 9e008c3c401ea935ef32593ddeda0a4963fab6f9 (patch) | |
| tree | 486b6386c025a1b55eef28f36071041da1e5158f | |
| parent | b79c85248a7cede77706226ec00e4eeb79eadfbe (diff) | |
When forcing through a signal for some thread-synchronous
event (ie SIGSEGV, SIGFPE etc that happens as a result of a
trap as opposed to an external event), if the signal is
blocked we will not invoce a signal handler, we will just
kill the thread with the signal.
This is equivalent to what we do in the SIG_IGN case: you
cannot ignore or block synchronous signals, and if you try,
we'll just have to kill you.
We don't want to handle endless recursive faults, which the
old behaviour easily led to if the stack was bad, for example.
| -rw-r--r-- | kernel/signal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 78c4dfa0073c..4768ea5bab22 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -797,10 +797,11 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t) int ret; spin_lock_irqsave(&t->sighand->siglock, flags); - if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) + if (sigismember(&t->blocked, sig) || t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) { t->sighand->action[sig-1].sa.sa_handler = SIG_DFL; - sigdelset(&t->blocked, sig); - recalc_sigpending_tsk(t); + sigdelset(&t->blocked, sig); + recalc_sigpending_tsk(t); + } ret = specific_send_sig_info(sig, info, t); spin_unlock_irqrestore(&t->sighand->siglock, flags); |
