]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
signals: cleanup the usage of print_fatal_signal()
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 30 Apr 2008 07:52:58 +0000 (00:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:36 +0000 (08:29 -0700)
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>
kernel/signal.c

index 0a873279393c37e83b40557e56bc1e2d8c884a06..0db1d93c4d68a9f247ee26d39768aa773f0f8481 100644 (file)
@@ -1787,9 +1787,10 @@ relock:
                 * 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