kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals
authorOleg Nesterov <oleg@redhat.com>
Fri, 17 Nov 2017 23:30:04 +0000 (15:30 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2018 08:29:52 +0000 (09:29 +0100)
commit794ac8ef9b06bd51186f6e54b763ecf4f94d7171
tree49cfc0c6c3c596d82d7849336a348535466159aa
parent1453b3ac6cf8c62abb5a50680c6626d460c63044
kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals

commit ac25385089f673560867eb5179228a44ade0cfc1 upstream.

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.

Link: http://lkml.kernel.org/r/20171103184227.GC21036@redhat.com
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Tested-by: Kyle Huey <me@kylehuey.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/signal.c