aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill A. Shutemov <[email protected]>2013-11-14 14:31:28 -0800
committerLinus Torvalds <[email protected]>2013-11-15 09:32:17 +0900
commit2cb6182bb6153f685c37773687e63094317b1eeb (patch)
tree8fd9b22a9f2b87cb2c664bab0729f3208e8b0ab2
parentd97a22913808b191c95fbfc51e6405c4504979e6 (diff)
avr32: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Acked-by: Hans-Christian Egtvedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--arch/avr32/include/asm/pgalloc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/avr32/include/asm/pgalloc.h b/arch/avr32/include/asm/pgalloc.h
index bc7e8ae479ee..1aba19d68c5e 100644
--- a/arch/avr32/include/asm/pgalloc.h
+++ b/arch/avr32/include/asm/pgalloc.h
@@ -68,7 +68,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
return NULL;
page = virt_to_page(pg);
- pgtable_page_ctor(page);
+ if (!pgtable_page_ctor(page)) {
+ quicklist_free(QUICK_PT, NULL, pg);
+ return NULL;
+ }
return page;
}