On Thu, 2 Sep 2010, KOSAKI Motohiro wrote: > > active_mm in the exec() path can be for an unrelated thread, so the > > oom_disable_count logic should use old_mm instead. > > > > Reported-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> > > Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx> > > --- > > fs/exec.c | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/fs/exec.c b/fs/exec.c > > --- a/fs/exec.c > > +++ b/fs/exec.c > > @@ -752,8 +752,8 @@ static int exec_mmap(struct mm_struct *mm) > > tsk->mm = mm; > > tsk->active_mm = mm; > > activate_mm(active_mm, mm); > > - if (tsk->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) { > > - atomic_dec(&active_mm->oom_disable_count); > > + if (old_mm && tsk->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) { > > + atomic_dec(&old_mm->oom_disable_count); > > atomic_inc(&tsk->mm->oom_disable_count); > > Looks good. However you need to use tsk->signal->oom_adj == OOM_DISABLE because > I removed OOM_SCORE_ADJ_MIN. > KOSAKI, I'm not going to argue this with you. VM patches, like where you revert oom_score_adj, go through Andrew. That's not up for debate. Thanks for the review. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>