OSDN Git Service

signal: Always ignore SIGKILL and SIGSTOP sent to the global init
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 20 Jul 2018 00:47:27 +0000 (19:47 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Nov 2019 13:43:27 +0000 (14:43 +0100)
commitaee8ed3b920d68d1d61a4ef3e6a09018aa027078
treee3846d3482a19934b450541eb9b579d66ca97113
parent3ccdcdef01c815d1c6a3be8857920699d21840f2
signal: Always ignore SIGKILL and SIGSTOP sent to the global init

[ Upstream commit 86989c41b5ea08776c450cb759592532314a4ed6 ]

If the first process started (aka /sbin/init) receives a SIGKILL it
will panic the system if it is delivered.  Making the system unusable
and undebugable.  It isn't much better if the first process started
receives SIGSTOP.

So always ignore SIGSTOP and SIGKILL sent to init.

This is done in a separate clause in sig_task_ignored as force_sig_info
can clear SIG_UNKILLABLE and this protection should work even then.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/signal.c