Commit 3b9cf77d authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds

frv: handle pgtable_page_ctor() fail

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0da5303b
...@@ -37,11 +37,15 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) ...@@ -37,11 +37,15 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address)
#else #else
page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0); page = alloc_pages(GFP_KERNEL|__GFP_REPEAT, 0);
#endif #endif
if (page) { if (!page)
clear_highpage(page); return NULL;
pgtable_page_ctor(page);
flush_dcache_page(page); clear_highpage(page);
if (!pgtable_page_ctor(page)) {
__free_page(page);
return NULL;
} }
flush_dcache_page(page);
return page; return page;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment