aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/signal.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 92a1ab004498..8bf7a40e5c71 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -55,10 +55,21 @@ static int sig_handler_ignored(void __user *handler, int sig)
55 (handler == SIG_DFL && sig_kernel_ignore(sig)); 55 (handler == SIG_DFL && sig_kernel_ignore(sig));
56} 56}
57 57
58static int sig_ignored(struct task_struct *t, int sig) 58static int sig_task_ignored(struct task_struct *t, int sig)
59{ 59{
60 void __user *handler; 60 void __user *handler;
61 61
62 handler = sig_handler(t, sig);
63
64 if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
65 handler == SIG_DFL)
66 return 1;
67
68 return sig_handler_ignored(handler, sig);
69}
70
71static int sig_ignored(struct task_struct *t, int sig)
72{
62 /* 73 /*
63 * Blocked signals are never ignored, since the 74 * Blocked signals are never ignored, since the
64 * signal handler may change by the time it is 75 * signal handler may change by the time it is
@@ -67,8 +78,7 @@ static int sig_ignored(struct task_struct *t, int sig)
67 if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig)) 78 if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
68 return 0; 79 return 0;
69 80
70 handler = sig_handler(t, sig); 81 if (!sig_task_ignored(t, sig))
71 if (!sig_handler_ignored(handler, sig))
72 return 0; 82 return 0;
73 83
74 /* 84 /*