aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 17:31:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 19:32:16 -0500
commitd97a22913808b191c95fbfc51e6405c4504979e6 (patch)
treec5fb74da2b4e726c59b858d77b9fdde8b7d1760e /arch
parentaffce5089a82a045274def17b44b13d10ab7c1d4 (diff)
arm64: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/include/asm/pgalloc.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm/pgalloc.h
index f214069ec5d5..9bea6e74a001 100644
--- a/arch/arm64/include/asm/pgalloc.h
+++ b/arch/arm64/include/asm/pgalloc.h
@@ -63,9 +63,12 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
63 struct page *pte; 63 struct page *pte;
64 64
65 pte = alloc_pages(PGALLOC_GFP, 0); 65 pte = alloc_pages(PGALLOC_GFP, 0);
66 if (pte) 66 if (!pte)
67 pgtable_page_ctor(pte); 67 return NULL;
68 68 if (!pgtable_page_ctor(pte)) {
69 __free_page(pte);
70 return NULL;
71 }
69 return pte; 72 return pte;
70} 73}
71 74