summaryrefslogtreecommitdiffstats
path: root/mm/page_cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_cgroup.c')
-rw-r--r--mm/page_cgroup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 4f31c9b..672089d 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -99,6 +99,8 @@ struct page_cgroup *lookup_page_cgroup(struct page *page)
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;
}
OpenPOWER on IntegriCloud