arm64: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
affce5089a
commit
d97a229138
|
@ -63,9 +63,12 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr)
|
|||
struct page *pte;
|
||||
|
||||
pte = alloc_pages(PGALLOC_GFP, 0);
|
||||
if (pte)
|
||||
pgtable_page_ctor(pte);
|
||||
|
||||
if (!pte)
|
||||
return NULL;
|
||||
if (!pgtable_page_ctor(pte)) {
|
||||
__free_page(pte);
|
||||
return NULL;
|
||||
}
|
||||
return pte;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue