All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded] memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops.patch removed from -mm tree
@ 2009-06-17 22:47 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-06-17 22:47 UTC (permalink / raw)
  To: hugh.dickins, balbir, dhaval, kamezawa.hiroyu, kosaki.motohiro,
	lizf, menage


The patch titled
     memcg: fix mem_cgroup_update_mapped_file_stat oops
has been removed from the -mm tree.  Its filename was
     memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops.patch

This patch was dropped because it was folded into memcg-add-file-based-rss-accounting.patch

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: memcg: fix mem_cgroup_update_mapped_file_stat oops
From: Hugh Dickins <hugh@veritas.com>

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.

Should go in as a fix to memcg-add-file-based-rss-accounting.patch but
it's curious that's the first thing to suffer from this divergence.

Perhaps this is the wrong fix, and there should be an explicit
mem_cgroup_disable() check somewhere else; but it would then seem
dangerous that SPARSEMEM and !SPARSEMEM diverge in this way, and there are
lots of lookup_page_cgroup NULL tests around.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.cn>
Cc: Paul Menage <menage@google.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_cgroup.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN mm/page_cgroup.c~memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops mm/page_cgroup.c
--- a/mm/page_cgroup.c~memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops
+++ a/mm/page_cgroup.c
@@ -99,6 +99,8 @@ struct page_cgroup *lookup_page_cgroup(s
 	unsigned long pfn = page_to_pfn(page);
 	struct mem_section *section = __pfn_to_section(pfn);
 
+	if (!section->page_cgroup)
+		return NULL;
 	return section->page_cgroup + pfn;
 }
 
_

Patches currently in -mm which might be from hugh.dickins@tiscali.co.uk are

origin.patch
memcg-add-file-based-rss-accounting.patch
memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops.patch
memcg-fix-swap-accounting.patch
memcg-fix-swap-accounting-update.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-17 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 22:47 [folded] memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.