summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-05-26 19:33:00 +0200
committerDavid S. Miller <davem@davemloft.net>2020-06-03 03:45:51 +0200
commit454b0289c6b5f2c66164654b80212d15fbef7a03 (patch)
tree8582dc17ac421fc74caad0d44386a2e7ff3cffec /arch/sparc
parentsparc32: register memory occupied by kernel as memblock.memory (diff)
downloadlinux-454b0289c6b5f2c66164654b80212d15fbef7a03.tar.xz
linux-454b0289c6b5f2c66164654b80212d15fbef7a03.zip
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: 1ae9ae5f7df7 ("sparc: handle pgtable_page_ctor() fail") Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/mm/srmmu.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index c861c0f0df73..589370a21b12 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;