sparc32: mm: Don't try to free page-table pages if ctor() fails
authorWill Deacon <will@kernel.org>
Tue, 26 May 2020 17:33:00 +0000 (18:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:29 +0000 (17:48 +0200)
commit692b4a425c8b7ae93aac419d81ec0b686a788e1b
tree45813a4811b178c8f62886dffc2d3f66d45271a6
parent0a8287278abc629be354db88450909c41e370feb
sparc32: mm: Don't try to free page-table pages if ctor() fails

[ 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