summaryrefslogtreecommitdiff
path: root/arch/avr32
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 14:31:28 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 09:32:17 +0900
commit2cb6182bb6153f685c37773687e63094317b1eeb (patch)
tree8fd9b22a9f2b87cb2c664bab0729f3208e8b0ab2 /arch/avr32
parentd97a22913808b191c95fbfc51e6405c4504979e6 (diff)
avr32: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/avr32')
-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;
}