kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals
PATCH 65/94 kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals
From: Oleg Nesterov <[email protected]>
Subject: kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals
Change sig_task_ignored() to drop the SIG_DFL && !sig_kernel_only() signals even if force == T. This simplifies the next change and this matches the same check in get_signal() which will drop these signals anyway.
Signed-off-by Oleg Nesterov <[email protected]>
Tested-by Kyle Huey <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/signal.c renamed from kernel/signal.c~protect-the-signal_unkillable-tasks-from-sig_kernel_only-signals +1 -1
@@ -78,7 +78,7 @@ static int sig_task_ignored(struct task_ handler =sig_handler (t, sig);if (unlikely (t->signal->flags &SIGNAL_UNKILLABLE ) && - handler ==SIG_DFL && !force) + handler ==SIG_DFL && !(force &&sig_kernel_only (sig)))return 1 ;return sig_handler_ignored (handler, sig);
_