aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 5120f1901f36..17afcaf582d0 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -59,21 +59,20 @@ static int sig_handler_ignored(void __user *handler, int sig)
59 (handler == SIG_DFL && sig_kernel_ignore(sig)); 59 (handler == SIG_DFL && sig_kernel_ignore(sig));
60} 60}
61 61
62static int sig_task_ignored(struct task_struct *t, int sig, 62static int sig_task_ignored(struct task_struct *t, int sig, bool force)
63 int from_ancestor_ns)
64{ 63{
65 void __user *handler; 64 void __user *handler;
66 65
67 handler = sig_handler(t, sig); 66 handler = sig_handler(t, sig);
68 67
69 if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) && 68 if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) &&
70 handler == SIG_DFL && !from_ancestor_ns) 69 handler == SIG_DFL && !force)
71 return 1; 70 return 1;
72 71
73 return sig_handler_ignored(handler, sig); 72 return sig_handler_ignored(handler, sig);
74} 73}
75 74
76static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns) 75static int sig_ignored(struct task_struct *t, int sig, bool force)
77{ 76{
78 /* 77 /*
79 * Blocked signals are never ignored, since the 78 * Blocked signals are never ignored, since the
@@ -83,7 +82,7 @@ static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns)
83 if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig)) 82 if (sigismember(&t->blocked, sig) || sigismember(&t->real_blocked, sig))
84 return 0; 83 return 0;
85 84
86 if (!sig_task_ignored(t, sig, from_ancestor_ns)) 85 if (!sig_task_ignored(t, sig, force))
87 return 0; 86 return 0;
88 87
89 /* 88 /*
@@ -856,7 +855,7 @@ static void ptrace_trap_notify(struct task_struct *t)
856 * Returns true if the signal should be actually delivered, otherwise 855 * Returns true if the signal should be actually delivered, otherwise
857 * it should be dropped. 856 * it should be dropped.
858 */ 857 */
859static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns) 858static int prepare_signal(int sig, struct task_struct *p, bool force)
860{ 859{
861 struct signal_struct *signal = p->signal; 860 struct signal_struct *signal = p->signal;
862 struct task_struct *t; 861 struct task_struct *t;
@@ -916,7 +915,7 @@ static int prepare_signal(int sig, struct task_struct *p, int from_ancestor_ns)
916 } 915 }
917 } 916 }
918 917
919 return !sig_ignored(p, sig, from_ancestor_ns); 918 return !sig_ignored(p, sig, force);
920} 919}
921 920
922/* 921/*
@@ -1060,7 +1059,8 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
1060 assert_spin_locked(&t->sighand->siglock); 1059 assert_spin_locked(&t->sighand->siglock);
1061 1060
1062 result = TRACE_SIGNAL_IGNORED; 1061 result = TRACE_SIGNAL_IGNORED;
1063 if (!prepare_signal(sig, t, from_ancestor_ns)) 1062 if (!prepare_signal(sig, t,
1063 from_ancestor_ns || (info == SEND_SIG_FORCED)))
1064 goto ret; 1064 goto ret;
1065 1065
1066 pending = group ? &t->signal->shared_pending : &t->pending; 1066 pending = group ? &t->signal->shared_pending : &t->pending;
@@ -1602,7 +1602,7 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
1602 1602
1603 ret = 1; /* the signal is ignored */ 1603 ret = 1; /* the signal is ignored */
1604 result = TRACE_SIGNAL_IGNORED; 1604 result = TRACE_SIGNAL_IGNORED;
1605 if (!prepare_signal(sig, t, 0)) 1605 if (!prepare_signal(sig, t, false))
1606 goto out; 1606 goto out;
1607 1607
1608 ret = 0; 1608 ret = 0;