summaryrefslogtreecommitdiff
path: root/kernel/signal.c
diff options
context:
space:
mode:
author <jgarzik@pretzel.yyz.us>2005-05-26 05:47:10 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2005-05-26 05:47:10 (GMT)
commit949d33e70f2c3e93bfe5265a50e40175b1ab1ec1 (patch)
treeca88fd8f8f81b167dc4685ed34e9636f267db60d /kernel/signal.c
parentb095518ef51c37658c58367bd19240b8a113f25c (diff)
parentbef9c558841604116704e10b3d9ff3dbf4939423 (diff)
downloadlinux-fsl-qoriq-949d33e70f2c3e93bfe5265a50e40175b1ab1ec1.tar.xz
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git branch HEAD
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 8f3debc..b3c24c7 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -522,7 +522,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)) {