diff options
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, | |||
523 | { | 523 | { |
524 | int sig = 0; | 524 | int sig = 0; |
525 | 525 | ||
526 | sig = next_signal(pending, mask); | 526 | /* SIGKILL must have priority, otherwise it is quite easy |
527 | * to create an unkillable process, sending sig < SIGKILL | ||
528 | * to self */ | ||
529 | if (unlikely(sigismember(&pending->signal, SIGKILL))) { | ||
530 | if (!sigismember(mask, SIGKILL)) | ||
531 | sig = SIGKILL; | ||
532 | } | ||
533 | |||
534 | if (likely(!sig)) | ||
535 | sig = next_signal(pending, mask); | ||
527 | if (sig) { | 536 | if (sig) { |
528 | if (current->notifier) { | 537 | if (current->notifier) { |
529 | if (sigismember(current->notifier_mask, sig)) { | 538 | if (sigismember(current->notifier_mask, sig)) { |