From: Will Deacon Date: Tue, 26 May 2020 17:33:00 +0000 (+0100) Subject: sparc32: mm: Don't try to free page-table pages if ctor() fails X-Git-Tag: v5.15~3656^2~3^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=454b0289c6b5f2c66164654b80212d15fbef7a03;p=platform%2Fkernel%2Flinux-starfive.git 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 Cc: Kirill A. Shutemov Fixes: 1ae9ae5f7df7 ("sparc: handle pgtable_page_ctor() fail") Signed-off-by: Will Deacon Signed-off-by: David S. Miller --- diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index c861c0f..589370a21 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -365,7 +365,6 @@ pgtable_t pte_alloc_one(struct mm_struct *mm) return NULL; page = pfn_to_page(__nocache_pa((unsigned long)ptep) >> PAGE_SHIFT); if (!pgtable_pte_page_ctor(page)) { - __free_page(page); return NULL; } return ptep;