]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/signal.c
cpufreq: Avoid leaving stale IRQ work items during CPU offline
[mirror_ubuntu-bionic-kernel.git] / kernel / signal.c
index eab385c966fa5cd016db0475ded55ec058cc07a8..0d887c0dad2e8a455ac0bfce677d7fd3283e7bb4 100644 (file)
@@ -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;
@@ -2271,6 +2275,8 @@ relock:
        if (signal_group_exit(signal)) {
                ksig->info.si_signo = signr = SIGKILL;
                sigdelset(&current->pending.signal, SIGKILL);
+               trace_signal_deliver(SIGKILL, SEND_SIG_NOINFO,
+                               &sighand->action[SIGKILL - 1]);
                recalc_sigpending();
                goto fatal;
        }