Commit 454b0289 authored by Will Deacon's avatar Will Deacon Committed by David S. Miller

sparc32: mm: Don't try to free page-table pages if ctor() fails

The pages backing page-table allocations for SRMMU are allocated via
memblock as part of the "nocache" region initialisation during
srmmu_paging_init() and should not be freed even if a later call to
pgtable_pte_page_ctor() fails.

Remove the broken call to __free_page().

Cc: David S. Miller <davem@davemloft.net>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Fixes: 1ae9ae5f ("sparc: handle pgtable_page_ctor() fail")
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee7c7953
...@@ -365,7 +365,6 @@ pgtable_t pte_alloc_one(struct mm_struct *mm) ...@@ -365,7 +365,6 @@ pgtable_t pte_alloc_one(struct mm_struct *mm)
return NULL; return NULL;
page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT);
if (!pgtable_pte_page_ctor(page)) { if (!pgtable_pte_page_ctor(page)) {
__free_page(page);
return NULL; return NULL;
} }
return ptep; return ptep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment