aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 17:31:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 19:32:19 -0500
commit76b3aec332e74596c517e1198764a5aeb8ea8398 (patch)
tree1cee055c301b61846b17b2b58a1d0ce2adfcb5c8
parent1ae9ae5f7df726c67736c643c1f03f7bdfe748eb (diff)
tile: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/tile/mm/pgtable.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/tile/mm/pgtable.c b/arch/tile/mm/pgtable.c
index 4fd9ec0b58ed..5e86eac4bfae 100644
--- a/arch/tile/mm/pgtable.c
+++ b/arch/tile/mm/pgtable.c
@@ -241,6 +241,11 @@ struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address,
241 if (p == NULL) 241 if (p == NULL)
242 return NULL; 242 return NULL;
243 243
244 if (!pgtable_page_ctor(p)) {
245 __free_pages(p, L2_USER_PGTABLE_ORDER);
246 return NULL;
247 }
248
244 /* 249 /*
245 * Make every page have a page_count() of one, not just the first. 250 * Make every page have a page_count() of one, not just the first.
246 * We don't use __GFP_COMP since it doesn't look like it works 251 * We don't use __GFP_COMP since it doesn't look like it works
@@ -251,7 +256,6 @@ struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address,
251 inc_zone_page_state(p+i, NR_PAGETABLE); 256 inc_zone_page_state(p+i, NR_PAGETABLE);
252 } 257 }
253 258
254 pgtable_page_ctor(p);
255 return p; 259 return p;
256} 260}
257 261