Re: [PATCH mmotm] memcg: fix mem_cgroup_update_mapped_file_statoops

From: KAMEZAWA Hiroyuki
Date: Thu Apr 30 2009 - 04:29:47 EST


On Thu, 30 Apr 2009 10:22:40 +0530
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> [2009-04-30 09:06:46]:
>
> > On Wed, 29 Apr 2009 22:13:33 +0100 (BST)
> > Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
> >
> > > CONFIG_SPARSEMEM=y CONFIG_CGROUP_MEM_RES_CTLR=y cgroup_disable=memory
> > > bootup is oopsing in mem_cgroup_update_mapped_file_stat(). !SPARSEMEM
> > > is fine because its lookup_page_cgroup() contains an explicit check for
> > > NULL node_page_cgroup, but the SPARSEMEM version was missing a check for
> > > NULL section->page_cgroup.
> > >
> > Ouch, it's curious this bug alive now.. thank you.
> >
> > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> >
> > I think this patch itself is sane but.. Balbir, could you see "caller" ?
> > It seems strange.
>
> Ideally we need to have a disabled check in
> mem_cgroup_update_mapped_file_stat(), but it seems as if this fix is
> better and fixes a larger scenario and the root cause of
> lookup_page_cgroup() OOPSing. It would not hurt to check for
> mem_cgroup_disabled() though, but too many checks might spoil the
> party for frequent operations.
>
> Kame, do you mean you wanted me to check if I am using
> lookup_page_cgroup() correctly?
>
Yes. I have no complaints to this patch but just curious.
Anyway thanks.

Regards,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/