Commit 2dce81bff28dceb2153c901883a56f278d91db65
Committed by
Linus Torvalds
1 parent
34c8f07b9a
Exists in
master
and in
39 other branches
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: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
kernel/signal.c
... | ... | @@ -1787,9 +1787,10 @@ |
1787 | 1787 | * Anything else is fatal, maybe with a core dump. |
1788 | 1788 | */ |
1789 | 1789 | current->flags |= PF_SIGNALED; |
1790 | - if ((signr != SIGKILL) && print_fatal_signals) | |
1791 | - print_fatal_signal(regs, signr); | |
1790 | + | |
1792 | 1791 | if (sig_kernel_coredump(signr)) { |
1792 | + if (print_fatal_signals) | |
1793 | + print_fatal_signal(regs, signr); | |
1793 | 1794 | /* |
1794 | 1795 | * If it was able to dump core, this kills all |
1795 | 1796 | * other threads in the group and synchronizes with |