aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 91b789dd6e72..534fec266a33 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -90,6 +90,11 @@ static bool sig_task_ignored(struct task_struct *t, int sig, bool force)
90 handler == SIG_DFL && !(force && sig_kernel_only(sig))) 90 handler == SIG_DFL && !(force && sig_kernel_only(sig)))
91 return true; 91 return true;
92 92
93 /* Only allow kernel generated signals to this kthread */
94 if (unlikely((t->flags & PF_KTHREAD) &&
95 (handler == SIG_KTHREAD_KERNEL) && !force))
96 return true;
97
93 return sig_handler_ignored(handler, sig); 98 return sig_handler_ignored(handler, sig);
94} 99}
95 100
@@ -349,7 +354,7 @@ void task_clear_jobctl_pending(struct task_struct *task, unsigned long mask)
349 * @task has %JOBCTL_STOP_PENDING set and is participating in a group stop. 354 * @task has %JOBCTL_STOP_PENDING set and is participating in a group stop.
350 * Group stop states are cleared and the group stop count is consumed if 355 * Group stop states are cleared and the group stop count is consumed if
351 * %JOBCTL_STOP_CONSUME was set. If the consumption completes the group 356 * %JOBCTL_STOP_CONSUME was set. If the consumption completes the group
352 * stop, the appropriate %SIGNAL_* flags are set. 357 * stop, the appropriate `SIGNAL_*` flags are set.
353 * 358 *
354 * CONTEXT: 359 * CONTEXT:
355 * Must be called with @task->sighand->siglock held. 360 * Must be called with @task->sighand->siglock held.
@@ -1885,6 +1890,7 @@ static void do_notify_pidfd(struct task_struct *task)
1885{ 1890{
1886 struct pid *pid; 1891 struct pid *pid;
1887 1892
1893 WARN_ON(task->exit_state == 0);
1888 pid = task_pid(task); 1894 pid = task_pid(task);
1889 wake_up_all(&pid->wait_pidfd); 1895 wake_up_all(&pid->wait_pidfd);
1890} 1896}