summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-05 17:06:56 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-11-05 17:40:18 +1100
commitc253db6aaee153b715991e767a4e4a537d7e38b1 (patch)
treeeb282739c1b788adf98b8e7ba93db6f99a53e2ab /arch
parentedff3388817c9adebe3ce04344da71d497d9f25a (diff)
xtensa: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/xtensa/include/asm/pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h
index 037671a655dc..b8774f1e21e6 100644
--- a/arch/xtensa/include/asm/pgalloc.h
+++ b/arch/xtensa/include/asm/pgalloc.h
@@ -58,7 +58,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
if (!pte)
return NULL;
page = virt_to_page(pte);
- pgtable_page_ctor(page);
+ if (!pgtable_page_ctor(page)) {
+ kmem_cache_free(pgtable_cache, pte);
+ return NULL;
+ }
return page;
}