The patch titled memcg: fix mem_cgroup_update_mapped_file_stat oops has been added to the -mm tree. Its filename is memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this 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@xxxxxxxxxxx> 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@xxxxxxxxxxx> Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Li Zefan <lizf@xxxxxxxxxxxxx> Cc: Paul Menage <menage@xxxxxxxxxx> Cc: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx> Cc: Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> Cc: YAMAMOTO Takashi <yamamoto@xxxxxxxxxxxxx> Cc: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxx are origin.patch linux-next.patch eliminate-thousands-of-warnings-with-gcc-32-build.patch eliminate-thousands-of-warnings-with-gcc-32-build-cleanup.patch mm-disable-preemption-in-apply_to_pte_range.patch integrity-nfsd-imbalance-bug-fix.patch ksm-mmu_notifiers-add-set_pte_at_notify.patch ksm-add-get_pte-helper-function-fetching-pte-for-va.patch ksm-add-get_pte-helper-function-fetching-pte-for-va-fix.patch ksm-add-page_wrprotect-write-protecting-page.patch ksm-add-replace_page-change-the-page-pte-is-pointing-to.patch ksm-add-ksm-kernel-shared-memory-driver.patch ksm-add-ksm-kernel-shared-memory-driver-checkpatch-fixes.patch ksm-add-ksm-kernel-shared-memory-driver-fix-unsafe-pte-fetching.patch ksm-add-ksm-kernel-shared-memory-driver-borked-on-non-x86.patch page-allocator-update-nr_free_pages-only-as-necessary-fix.patch getrusage-fill-ru_maxrss-value.patch memcg-add-file-based-rss-accounting-fix-mem_cgroup_update_mapped_file_stat-oops.patch prio_tree-debugging-patch.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html