From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: balbir@linux.vnet.ibm.com,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [BUGFIX][PATCH -mm] fix bad call of memcg_oom_recover at cancel move.
Date: Fri, 18 Jun 2010 11:17:35 +0900 [thread overview]
Message-ID: <20100618111735.b3d64d95.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20100618105741.4e596ea7.nishimura@mxp.nes.nec.co.jp>
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>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-06-18 2:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 8:20 KAMEZAWA Hiroyuki
2010-06-17 9:24 ` Balbir Singh
2010-06-18 1:57 ` Daisuke Nishimura
2010-06-18 2:17 ` KAMEZAWA Hiroyuki [this message]
2010-06-18 3:15 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100618111735.b3d64d95.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox