diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2013-11-14 17:31:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-14 19:32:19 -0500 |
commit | 8f43123d170ad9a6760e424af5bde7569fdd8c12 (patch) | |
tree | d55e6f3c2911d3b6f9b1b8afce3204aae511e88f /arch/xtensa/include | |
parent | cecbd1b5afb01ed6ee14e14234b2e8c52e26c841 (diff) |
xtensa: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/xtensa/include')
-rw-r--r-- | arch/xtensa/include/asm/pgalloc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/pgalloc.h b/arch/xtensa/include/asm/pgalloc.h index 037671a655dc..b8774f1e21e6 100644 --- a/arch/xtensa/include/asm/pgalloc.h +++ b/arch/xtensa/include/asm/pgalloc.h | |||
@@ -58,7 +58,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, | |||
58 | if (!pte) | 58 | if (!pte) |
59 | return NULL; | 59 | return NULL; |
60 | page = virt_to_page(pte); | 60 | page = virt_to_page(pte); |
61 | pgtable_page_ctor(page); | 61 | if (!pgtable_page_ctor(page)) { |
62 | kmem_cache_free(pgtable_cache, pte); | ||
63 | return NULL; | ||
64 | } | ||
62 | return page; | 65 | return page; |
63 | } | 66 | } |
64 | 67 | ||