Skip to content

Commit

Permalink
xtensa: handle pgtable_page_ctor() fail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kirill A. Shutemov authored and Linus Torvalds committed Nov 15, 2013
1 parent cecbd1b commit 8f43123
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/xtensa/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm,
if (!pte)
return NULL;
page = virt_to_page(pte);
pgtable_page_ctor(page);
if (!pgtable_page_ctor(page)) {
kmem_cache_free(pgtable_cache, pte);
return NULL;
}
return page;
}

Expand Down

0 comments on commit 8f43123

Please sign in to comment.