aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 17:31:26 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 19:32:16 -0500
commitaffce5089a82a045274def17b44b13d10ab7c1d4 (patch)
tree2503c11b13777987f93cf198375c8402e2f20d78 /arch/arm/include/asm
parentca6ec3bbaaaf5941e970314a2eb3680b9e7e698a (diff)
arm: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/pgalloc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/include/asm/pgalloc.h b/arch/arm/include/asm/pgalloc.h
index 943504f53f57..78a779361682 100644
--- a/arch/arm/include/asm/pgalloc.h
+++ b/arch/arm/include/asm/pgalloc.h
@@ -102,12 +102,14 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
102#else 102#else
103 pte = alloc_pages(PGALLOC_GFP, 0); 103 pte = alloc_pages(PGALLOC_GFP, 0);
104#endif 104#endif
105 if (pte) { 105 if (!pte)
106 if (!PageHighMem(pte)) 106 return NULL;
107 clean_pte_table(page_address(pte)); 107 if (!PageHighMem(pte))
108 pgtable_page_ctor(pte); 108 clean_pte_table(page_address(pte));
109 if (!pgtable_page_ctor(pte)) {
110 __free_page(pte);
111 return NULL;
109 } 112 }
110
111 return pte; 113 return pte;
112} 114}
113 115