[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130215152538.9a61a44e.akpm@linux-foundation.org>
Date: Fri, 15 Feb 2013 15:25:38 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Mandeep Singh Baines <msb@...omium.org>
Cc: linux-kernel@...r.kernel.org, Ben Chan <benchan@...omium.org>,
Oleg Nesterov <oleg@...hat.com>, Tejun Heo <tj@...nel.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 5/5] coredump: abort core dump piping only due to a
fatal signal
On Thu, 14 Feb 2013 15:38:16 -0800
Mandeep Singh Baines <msb@...omium.org> wrote:
> From: Ben Chan <benchan@...omium.org>
>
> 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.
Sounds sensible. The changelog is rather hard to understand. Is the
below accurate?
: Make wait_for_dump_helpers() not abort piping the core dump data when the
: crashing process has received a non-fatal signal. The abort still occurs
: in the case of 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.
> --- a/fs/coredump.c
> +++ b/fs/coredump.c
> @@ -32,6 +32,7 @@
> #include <linux/pipe_fs_i.h>
> #include <linux/oom.h>
> #include <linux/compat.h>
> +#include <linux/freezer.h>
>
> #include <asm/uaccess.h>
> #include <asm/mmu_context.h>
> @@ -417,10 +418,13 @@ 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);
> + pipe_unlock(pipe);
> + try_to_freeze();
> + pipe_lock(pipe);
> }
The new call to try_to_freeze() is unchangelogged and uncommented. Can
we please fix both these things?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists