diff options
Diffstat (limited to 'mm/page_ext.c')
-rw-r--r-- | mm/page_ext.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/page_ext.c b/mm/page_ext.c index 4d1eac0d4fc5..f5938c81b763 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c @@ -54,9 +54,6 @@ static struct page_ext_operations *page_ext_ops[] = { &debug_guardpage_ops, -#ifdef CONFIG_PAGE_POISONING - &page_poisoning_ops, -#endif #ifdef CONFIG_PAGE_OWNER &page_owner_ops, #endif @@ -111,6 +108,9 @@ struct page_ext *lookup_page_ext(struct page *page) * page can reach here before the page_ext arrays are * allocated when feeding a range of pages to the allocator * for the first time during bootup or memory hotplug. + * + * This check is also necessary for ensuring page poisoning + * works as expected when enabled */ if (unlikely(!base)) return NULL; @@ -183,8 +183,11 @@ struct page_ext *lookup_page_ext(struct page *page) * page can reach here before the page_ext arrays are * allocated when feeding a range of pages to the allocator * for the first time during bootup or memory hotplug. + * + * This check is also necessary for ensuring page poisoning + * works as expected when enabled */ - if (!section->page_ext) + if (!section || !section->page_ext) return NULL; return section->page_ext + pfn; } |