linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] exec: abort core dump piping only due to a fatal signal
@ 2012-03-01 18:23 Ben Chan
  2012-03-01 19:03 ` Oleg Nesterov
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Chan @ 2012-03-01 18:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Chan, Alexander Viro, Andrew Morton, Oleg Nesterov,
	linux-fsdevel

This patch makes wait_for_dump_helpers() not to abort piping the core
dump data when the crashing process has received any but a fatal signal
(SIGKILL). The rationale is that a crashing process may still receive
uninteresting signals such as SIGCHLD when its core dump data is being
redirected to a helper application. While it's necessary to allow
terminating the core dump piping via SIGKILL, it's practically more
useful for the purpose of debugging and crash reporting if the core dump
piping is not aborted due to other non-fatal signals.

Addresses http://code.google.com/p/chromium-os/issues/detail?id=21559

Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
---
 fs/exec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 92ce83a..a614203 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -2031,7 +2031,7 @@ static void wait_for_dump_helpers(struct file *file)
 	pipe->readers++;
 	pipe->writers--;
 
-	while ((pipe->readers > 1) && (!signal_pending(current))) {
+	while ((pipe->readers > 1) && (!fatal_signal_pending(current))) {
 		wake_up_interruptible_sync(&pipe->wait);
 		kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
 		pipe_wait(pipe);
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-01 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 18:23 [PATCH] exec: abort core dump piping only due to a fatal signal Ben Chan
2012-03-01 19:03 ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).