diff --git a/kernel/signal.c b/kernel/signal.c index bb801156628ee..c9b203875001e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -77,6 +77,10 @@ static int sig_task_ignored(struct task_struct *t, int sig, bool force) handler = sig_handler(t, sig); + /* SIGKILL and SIGSTOP may not be sent to the global init */ + if (unlikely(is_global_init(t) && sig_kernel_only(sig))) + return true; + if (unlikely(t->signal->flags & SIGNAL_UNKILLABLE) && handler == SIG_DFL && !(force && sig_kernel_only(sig))) return 1;