lkml.org 
[lkml]   [2014]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] oom: kill the insufficient and no longer needed PT_TRACE_EXIT check
On Tue 02-12-14 19:05:29, Oleg Nesterov wrote:
> On 12/02, Michal Hocko wrote:
> >
> > On Fri 28-11-14 00:04:08, Oleg Nesterov wrote:
> > > After the previous patch we can remove the PT_TRACE_EXIT check in
> > > oom_scan_process_thread(), it was added to handle the case when the
> > > coredumping was "frozen" by ptrace, but it doesn't really work. If
> > > nothing else, we would need to check all threads which could share
> > > the same ->mm to make it more or less correct.
> > >
> > > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> >
> > I still do not see why we do not need task->ptrace & PT_TRACE_EXIT check
> > here. I do understand that the check on group_leader doesn't make much
> > sense. ptrace_event would block until the tracer let the task run again
> > which may be never AFAICS.
>
> No, note that PT_TRACE_EXIT (the last ptrace event) is reported before
> PF_EXITING is set.

OK, I managed to confuse myself by the PF_EXITING test before
exit_signals in do_exit but now that I am looking closer it seems that
this is not interesting from the OOM POV.

Thanks for the clarification. This code is so subtle that I rather ask
than miss something.

Acked-by: Michal Hocko <mhocko@suse.cz>

> (just in case... we do have some problems with SIGKILL && ptrace, but
> this is completely off-topic and has nothing to do with oom-kill.c)
>
> Oleg.
>

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2014-12-02 20:01    [W:0.043 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site