提交 2dce81bf 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

signals: cleanup the usage of print_fatal_signal()

Move the callsite of print_fatal_signal() down, under "if
(sig_kernel_coredump(signr))", so we don't need to check signr != SIGKILL.

We are only interested in the sig_kernel_coredump() signals anyway, and due to
the previous changes we almost never can see other fatal signals here except
SIGKILL.
Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 34c8f07b
......@@ -1787,9 +1787,10 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
* Anything else is fatal, maybe with a core dump.
*/
current->flags |= PF_SIGNALED;
if ((signr != SIGKILL) && print_fatal_signals)
print_fatal_signal(regs, signr);
if (sig_kernel_coredump(signr)) {
if (print_fatal_signals)
print_fatal_signal(regs, signr);
/*
* If it was able to dump core, this kills all
* other threads in the group and synchronizes with
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册