mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
tile: handle pgtable_page_ctor() fail
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Chris Metcalf <cmetcalf@tilera.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
1ae9ae5f7d
commit
76b3aec332
1 changed files with 5 additions and 1 deletions
|
@ -241,6 +241,11 @@ struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address,
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (!pgtable_page_ctor(p)) {
|
||||||
|
__free_pages(p, L2_USER_PGTABLE_ORDER);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make every page have a page_count() of one, not just the first.
|
* Make every page have a page_count() of one, not just the first.
|
||||||
* We don't use __GFP_COMP since it doesn't look like it works
|
* We don't use __GFP_COMP since it doesn't look like it works
|
||||||
|
@ -251,7 +256,6 @@ struct page *pgtable_alloc_one(struct mm_struct *mm, unsigned long address,
|
||||||
inc_zone_page_state(p+i, NR_PAGETABLE);
|
inc_zone_page_state(p+i, NR_PAGETABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pgtable_page_ctor(p);
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue