diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-02 17:39:11 +0200 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-02 17:39:11 +0200 |
commit | 1c3f45ab2f7f879ea482501c83899505c31f7539 (patch) | |
tree | 672465b3b9b3e2e26a8caf74ed64aa6885c52c13 /kernel/signal.c | |
parent | AUDIT: Fix user pointer deref thinko in sys_socketcall(). (diff) | |
parent | Merge of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 (diff) | |
download | linux-1c3f45ab2f7f879ea482501c83899505c31f7539.tar.xz linux-1c3f45ab2f7f879ea482501c83899505c31f7539.zip |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 293e189d8bc3..c89821b69ae3 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -523,7 +523,16 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask, { int sig = 0; - sig = next_signal(pending, mask); + /* SIGKILL must have priority, otherwise it is quite easy + * to create an unkillable process, sending sig < SIGKILL + * to self */ + if (unlikely(sigismember(&pending->signal, SIGKILL))) { + if (!sigismember(mask, SIGKILL)) + sig = SIGKILL; + } + + if (likely(!sig)) + sig = next_signal(pending, mask); if (sig) { if (current->notifier) { if (sigismember(current->notifier_mask, sig)) { |