lkml.org 
[lkml]   [2020]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.7 087/477] sparc32: mm: Dont try to free page-table pages if ctor() fails
    Date
    From: Will Deacon <will@kernel.org>

    [ Upstream commit 454b0289c6b5f2c66164654b80212d15fbef7a03 ]

    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: 1ae9ae5f7df7 ("sparc: handle pgtable_page_ctor() fail")
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/sparc/mm/srmmu.c | 1 -
    1 file changed, 1 deletion(-)

    diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
    index a8c2f2615fc6f..ecc9e8786d57f 100644
    --- a/arch/sparc/mm/srmmu.c
    +++ b/arch/sparc/mm/srmmu.c
    @@ -383,7 +383,6 @@ pgtable_t pte_alloc_one(struct mm_struct *mm)
    return NULL;
    page = pfn_to_page(__nocache_pa(pte) >> PAGE_SHIFT);
    if (!pgtable_pte_page_ctor(page)) {
    - __free_page(page);
    return NULL;
    }
    return page;
    --
    2.25.1


    \
     
     \ /
      Last update: 2020-06-23 22:05    [W:2.620 / U:1.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site