linux-yocto/arch/arm64
Dev Jain 6a8aa6420a 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-07-10 15:57:42 +02:00
..
boot arm64: dts: ti: k3-am65-main: Add missing taps to sdhci0 2025-06-27 11:05:18 +01:00
configs arm64: defconfig: build imx-sdma as a module 2022-04-08 14:24:00 +02:00
crypto crypto: arm64/gcm - Select AEAD for GHASH_ARM64_CE 2022-08-17 14:23:26 +02:00
hyperv
include arm64: proton-pack: Add new CPUs 'k' values for branch mitigation 2025-06-27 11:05:37 +01:00
kernel arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() 2025-06-27 11:05:38 +01:00
kvm KVM: arm64: Eagerly switch ZCR_EL{1,2} 2025-05-02 07:44:17 +02:00
lib arm64: insn: Add support for encoding DSB 2025-06-27 11:05:37 +01:00
mm arm64: Restrict pagetable teardown to avoid false warning 2025-07-10 15:57:42 +02:00
net arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users 2025-06-27 11:05:37 +01:00
tools arm64: errata: Add workaround for Arm errata 3194386 and 3312417 2024-08-19 05:45:40 +02:00
xen xen/arm: call uaccess_ttbr0_enable for dm_op hypercall 2025-06-27 11:05:22 +01:00
Kbuild
Kconfig arm64: errata: Expand speculative SSBS workaround once more 2024-10-17 15:11:45 +02:00
Kconfig.debug
Kconfig.platforms irqchip/exiu: Fix acknowledgment of edge triggered interrupts 2022-06-09 10:22:54 +02:00
Makefile arm64: Force position-independent veneers 2024-11-01 01:52:35 +01:00