linux-yocto/arch/arm64/mm
Dev Jain 6562806f32 arm64: Restrict pagetable teardown to avoid false warning
commit 650768c512 upstream.

Commit 9c006972c3 ("arm64: mmu: drop pXd_present() checks from
pXd_free_pYd_table()") removes the pxd_present() checks because the
caller checks pxd_present(). But, in case of vmap_try_huge_pud(), the
caller only checks pud_present(); pud_free_pmd_page() recurses on each
pmd through pmd_free_pte_page(), wherein the pmd may be none. Thus it is
possible to hit a warning in the latter, since pmd_none => !pmd_table().
Thus, add a pmd_present() check in pud_free_pmd_page().

This problem was found by code inspection.

Fixes: 9c006972c3 ("arm64: mmu: drop pXd_present() checks from pXd_free_pYd_table()")
Cc: stable@vger.kernel.org
Reported-by: Ryan Roberts <ryan.roberts@arm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Link: https://lore.kernel.org/r/20250527082633.61073-1-dev.jain@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:09:00 +01:00
..
cache.S
context.c arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs 2024-12-14 19:59:52 +01:00
copypage.c
dma-mapping.c
extable.c
fault.c mm: drop per-VMA lock when returning VM_FAULT_RETRY or VM_FAULT_COMPLETED 2023-08-24 16:20:17 -07:00
fixmap.c
flush.c arm64: implement the new page table range API 2023-08-24 16:20:20 -07:00
hugetlbpage.c arm64: hugetlb: Fix huge_ptep_get_and_clear() for non-present ptes 2025-03-13 12:58:38 +01:00
init.c dma-maping updates for Linux 6.6 2023-08-29 20:32:10 -07:00
ioremap.c arm64 : mm: add wrapper function ioremap_prot() 2023-08-18 10:12:36 -07:00
kasan_init.c
Makefile
mmap.c
mmu.c arm64: Restrict pagetable teardown to avoid false warning 2025-06-27 11:09:00 +01:00
mteswap.c mm/swap: stop using page->private on tail pages for THP_SWAP 2023-08-24 16:20:28 -07:00
pageattr.c arm64: hibernate: Fix level3 translation fault in swsusp_save() 2024-04-27 17:11:41 +02:00
pgd.c
physaddr.c
proc.S arm64/mm: Replace an open coding with ID_AA64MMFR1_EL1_HAFDBS_MASK 2023-07-27 11:01:46 +01:00
ptdump_debugfs.c
ptdump.c
trans_pgd-asm.S
trans_pgd.c Add x86 shadow stack support 2023-08-31 12:20:12 -07:00