Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-23 Thread Oleg Nesterov
Mandeep, sorry for delay. On 02/20, Mandeep Singh Baines wrote: > > On Tue, Feb 19, 2013 at 12:20 PM, Mandeep Singh Baines > wrote: > > Ah. Good point. How about this then: > > > > /* can't use wait_event_freezable since we suppress the fake signal on > > SIGNAL_GROUP_COREDUMP */ > >

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-23 Thread Oleg Nesterov
Mandeep, sorry for delay. On 02/20, Mandeep Singh Baines wrote: On Tue, Feb 19, 2013 at 12:20 PM, Mandeep Singh Baines m...@chromium.org wrote: Ah. Good point. How about this then: /* can't use wait_event_freezable since we suppress the fake signal on SIGNAL_GROUP_COREDUMP */

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-20 Thread Mandeep Singh Baines
On Tue, Feb 19, 2013 at 12:20 PM, Mandeep Singh Baines wrote: > On Tue, Feb 19, 2013 at 11:45 AM, Oleg Nesterov wrote: >> On 02/19, Mandeep Singh Baines wrote: >>> >>> On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov wrote: >>> > Please look at 1-3 I sent. Btw, I slightly tested this series,

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-20 Thread Mandeep Singh Baines
On Tue, Feb 19, 2013 at 12:20 PM, Mandeep Singh Baines m...@chromium.org wrote: On Tue, Feb 19, 2013 at 11:45 AM, Oleg Nesterov o...@redhat.com wrote: On 02/19, Mandeep Singh Baines wrote: On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov o...@redhat.com wrote: Please look at 1-3 I sent. Btw,

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Mandeep Singh Baines
On Tue, Feb 19, 2013 at 11:45 AM, Oleg Nesterov wrote: > On 02/19, Mandeep Singh Baines wrote: >> >> On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov wrote: >> > Please look at 1-3 I sent. Btw, I slightly tested this series, seems >> > to work... >> > >> >> They look good to me. I plan on applying

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Oleg Nesterov
On 02/19, Mandeep Singh Baines wrote: > > On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov wrote: > > Please look at 1-3 I sent. Btw, I slightly tested this series, seems > > to work... > > > > They look good to me. I plan on applying them to our tree since we > need a fix ASAP. Great! > >> You'd

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Mandeep Singh Baines
On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov wrote: > On 02/18, Mandeep Singh Baines wrote: >> >> On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov wrote: >> >> --- x/fs/coredump.c >> >> +++ x/fs/coredump.c >> >> @@ -416,17 +416,17 @@ static void wait_for_dump_helpers(struct >> >>

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Oleg Nesterov
On 02/18, Mandeep Singh Baines wrote: > > On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov wrote: > >> > >> Why? __fatal_signal_pending() is enough, you do not need to check > >> ->shared_pending. And once again, ignoring the freezer problems I > >> do not think we need this check at all. > >> > >

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Oleg Nesterov
On 02/18, Mandeep Singh Baines wrote: > > On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov wrote: > >> --- x/fs/coredump.c > >> +++ x/fs/coredump.c > >> @@ -416,17 +416,17 @@ static void wait_for_dump_helpers(struct > >> pipe_lock(pipe); > >> pipe->readers++; > >>

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Oleg Nesterov
On 02/18, Mandeep Singh Baines wrote: On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov o...@redhat.com wrote: --- x/fs/coredump.c +++ x/fs/coredump.c @@ -416,17 +416,17 @@ static void wait_for_dump_helpers(struct pipe_lock(pipe); pipe-readers++; pipe-writers--; +

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Oleg Nesterov
On 02/18, Mandeep Singh Baines wrote: On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov o...@redhat.com wrote: Why? __fatal_signal_pending() is enough, you do not need to check -shared_pending. And once again, ignoring the freezer problems I do not think we need this check at all. The

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Mandeep Singh Baines
On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov o...@redhat.com wrote: On 02/18, Mandeep Singh Baines wrote: On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov o...@redhat.com wrote: --- x/fs/coredump.c +++ x/fs/coredump.c @@ -416,17 +416,17 @@ static void wait_for_dump_helpers(struct

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Oleg Nesterov
On 02/19, Mandeep Singh Baines wrote: On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov o...@redhat.com wrote: Please look at 1-3 I sent. Btw, I slightly tested this series, seems to work... They look good to me. I plan on applying them to our tree since we need a fix ASAP. Great!

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-19 Thread Mandeep Singh Baines
On Tue, Feb 19, 2013 at 11:45 AM, Oleg Nesterov o...@redhat.com wrote: On 02/19, Mandeep Singh Baines wrote: On Tue, Feb 19, 2013 at 6:27 AM, Oleg Nesterov o...@redhat.com wrote: Please look at 1-3 I sent. Btw, I slightly tested this series, seems to work... They look good to me. I plan

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-18 Thread Mandeep Singh Baines
On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov wrote: > On 02/16, Oleg Nesterov wrote: >> >> On 02/16, Mandeep Singh Baines wrote: >> > >> > +static int sigkill_pending(struct task_struct *tsk) >> > +{ >> > + return signal_pending(tsk) && >> > + (sigismember(>pending.signal,

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-18 Thread Mandeep Singh Baines
On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov wrote: > On 02/16, Oleg Nesterov wrote: >> >> On 02/16, Mandeep Singh Baines wrote: >> > >> > +static int sigkill_pending(struct task_struct *tsk) >> > +{ >> > + return signal_pending(tsk) && >> > + (sigismember(>pending.signal,

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-18 Thread Mandeep Singh Baines
On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov o...@redhat.com wrote: On 02/16, Oleg Nesterov wrote: On 02/16, Mandeep Singh Baines wrote: +static int sigkill_pending(struct task_struct *tsk) +{ + return signal_pending(tsk) + (sigismember(tsk-pending.signal, SIGKILL) ||

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-18 Thread Mandeep Singh Baines
On Sat, Feb 16, 2013 at 11:46 AM, Oleg Nesterov o...@redhat.com wrote: On 02/16, Oleg Nesterov wrote: On 02/16, Mandeep Singh Baines wrote: +static int sigkill_pending(struct task_struct *tsk) +{ + return signal_pending(tsk) + (sigismember(tsk-pending.signal, SIGKILL) ||

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-16 Thread Oleg Nesterov
On 02/16, Oleg Nesterov wrote: > > On 02/16, Mandeep Singh Baines wrote: > > > > +static int sigkill_pending(struct task_struct *tsk) > > +{ > > + return signal_pending(tsk) && > > + (sigismember(>pending.signal, SIGKILL) || > > +sigismember(>signal->shared_pending.signal,

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-16 Thread Oleg Nesterov
On 02/16, Mandeep Singh Baines wrote: > > 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. > > Testing: > > localhost ~ # echo "|/usr/bin/sleep 1d" >

[PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-16 Thread Mandeep Singh Baines
From: Ben Chan 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. Testing: localhost ~ # echo "|/usr/bin/sleep 1d" > /proc/sys/kernel/core_pattern localhost ~ # sleep 1d &

[PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-16 Thread Mandeep Singh Baines
From: Ben Chan benc...@chromium.org 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. Testing: localhost ~ # echo |/usr/bin/sleep 1d /proc/sys/kernel/core_pattern localhost

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-16 Thread Oleg Nesterov
On 02/16, Mandeep Singh Baines wrote: 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. Testing: localhost ~ # echo |/usr/bin/sleep 1d /proc/sys/kernel/core_pattern

Re: [PATCH 5/5] coredump: ignore non-fatal signals when core dumping to a pipe

2013-02-16 Thread Oleg Nesterov
On 02/16, Oleg Nesterov wrote: On 02/16, Mandeep Singh Baines wrote: +static int sigkill_pending(struct task_struct *tsk) +{ + return signal_pending(tsk) + (sigismember(tsk-pending.signal, SIGKILL) || +sigismember(tsk-signal-shared_pending.signal, SIGKILL));