summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-04-30 09:52:58 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 17:29:36 +0200
commit2dce81bff28dceb2153c901883a56f278d91db65 (patch)
tree831da312ea00c5c505d376098b5b1a90fe33fed7 /kernel
parentsignals: handle_stop_signal: don't worry about SIGKILL (diff)
downloadlinux-2dce81bff28dceb2153c901883a56f278d91db65.tar.xz
linux-2dce81bff28dceb2153c901883a56f278d91db65.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 0a873279393c..0db1d93c4d68 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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