OSDN Git Service

signal: send_sig_all no longer needs SEND_SIG_FORCED
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 21 Jul 2018 16:35:55 +0000 (11:35 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 11 Sep 2018 19:19:07 +0000 (21:19 +0200)
Now that send_signal always delivers SEND_SIG_PRIV signals to a pid
namespace init it is no longer necessary to use SEND_SIG_FORCED when
calling do_send_sig_info to ensure that pid namespace inits are
signaled and possibly killed.  Using SEND_SIG_PRIV is sufficient.

So use SEND_SIG_PRIV so that userspace when it receives a SIGTERM can
tell that the kernel sent the signal and not some random userspace
application.

Fixes: b82c32872db2 ("sysrq: use SEND_SIG_FORCED instead of force_sig()")
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
drivers/tty/sysrq.c

index 06ed20d..ad1ee5d 100644 (file)
@@ -348,7 +348,7 @@ static void send_sig_all(int sig)
                if (is_global_init(p))
                        continue;
 
-               do_send_sig_info(sig, SEND_SIG_FORCED, p, PIDTYPE_MAX);
+               do_send_sig_info(sig, SEND_SIG_PRIV, p, PIDTYPE_MAX);
        }
        read_unlock(&tasklist_lock);
 }