Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-30 Thread Oleg Nesterov
On 09/30, Tetsuo Handa wrote: > > Oleg Nesterov wrote: > > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > > are wrong. ->mm can be if task is the exited group leader. This means > > can be [missing word here?] if task Yes thanks. Will fix in v2. Hmm. And I just noticed

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-30 Thread Oleg Nesterov
On 09/29, David Rientjes wrote: > > On Tue, 29 Sep 2015, Oleg Nesterov wrote: > > > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > > are wrong. ->mm can be if task is the exited group leader. This means > > in particular that "kill sharing same memory" loop can miss a

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-30 Thread Oleg Nesterov
On 09/29, David Rientjes wrote: > > On Tue, 29 Sep 2015, Oleg Nesterov wrote: > > > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > > are wrong. ->mm can be if task is the exited group leader. This means > > in particular that "kill sharing same memory" loop can miss a

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-30 Thread Oleg Nesterov
On 09/30, Tetsuo Handa wrote: > > Oleg Nesterov wrote: > > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > > are wrong. ->mm can be if task is the exited group leader. This means > > can be [missing word here?] if task Yes thanks. Will fix in v2. Hmm. And I just noticed

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-29 Thread Tetsuo Handa
Oleg Nesterov wrote: > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > are wrong. ->mm can be if task is the exited group leader. This means can be [missing word here?] if task > +static bool process_has_mm(struct task_struct *p, struct mm_struct *mm) > +{ > +

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-29 Thread David Rientjes
On Tue, 29 Sep 2015, Oleg Nesterov wrote: > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > are wrong. ->mm can be if task is the exited group leader. This means > in particular that "kill sharing same memory" loop can miss a process > with a zombie leader which uses the

[PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-29 Thread Oleg Nesterov
Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() are wrong. ->mm can be if task is the exited group leader. This means in particular that "kill sharing same memory" loop can miss a process with a zombie leader which uses the same ->mm. Note: the process_has_mm(child, p->mm)

[PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-29 Thread Oleg Nesterov
Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() are wrong. ->mm can be if task is the exited group leader. This means in particular that "kill sharing same memory" loop can miss a process with a zombie leader which uses the same ->mm. Note: the process_has_mm(child, p->mm)

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-29 Thread David Rientjes
On Tue, 29 Sep 2015, Oleg Nesterov wrote: > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > are wrong. ->mm can be if task is the exited group leader. This means > in particular that "kill sharing same memory" loop can miss a process > with a zombie leader which uses the

Re: [PATCH -mm 3/3] mm/oom_kill: fix the wrong task->mm == mm checks in

2015-09-29 Thread Tetsuo Handa
Oleg Nesterov wrote: > Both "child->mm == mm" and "p->mm != mm" checks in oom_kill_process() > are wrong. ->mm can be if task is the exited group leader. This means can be [missing word here?] if task > +static bool process_has_mm(struct task_struct *p, struct mm_struct *mm) > +{ > +