lkml.org 
[lkml]   [2010]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUGFIX][PATCH -mm] fix bad call of memcg_oom_recover at cancel move.
On Fri, 18 Jun 2010 10:57:41 +0900
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:

> > May I recommend the following change instead
> >
> >
> > Don't crash on a null memcg being passed, check if memcg
> > is NULL and handle the condition gracefully
> >
> > Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
> > ---
> > mm/memcontrol.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index c6ece0a..d71c488 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -1370,7 +1370,7 @@ static void memcg_wakeup_oom(struct mem_cgroup *mem)
> >
> > static void memcg_oom_recover(struct mem_cgroup *mem)
> > {
> > - if (mem->oom_kill_disable && atomic_read(&mem->oom_lock))
> > + if (mem && mem->oom_kill_disable && atomic_read(&mem->oom_lock))
> > memcg_wakeup_oom(mem);
> > }
> >
> I agree to this fix.
>
> Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
>

I tend to dislike band-aid in callee. but it's not important here.

Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>






\
 
 \ /
  Last update: 2010-06-18 04:25    [W:0.037 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site