kernel_samsung_a53x/arch/arm64
Jonathan Cameron 8ccfca2782 arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry
[ Upstream commit 2488444274c70038eb6b686cba5f1ce48ebb9cdd ]

In a review discussion of the changes to support vCPU hotplug where
a check was added on the GICC being enabled if was online, it was
noted that there is need to map back to the cpu and use that to index
into a cpumask. As such, a valid ID is needed.

If an MPIDR check fails in acpi_map_gic_cpu_interface() it is possible
for the entry in cpu_madt_gicc[cpu] == NULL.  This function would
then cause a NULL pointer dereference.   Whilst a path to trigger
this has not been established, harden this caller against the
possibility.

Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240529133446.28446-13-Jonathan.Cameron@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-19 00:09:58 +01:00
..
boot ARM64: dts/s5e8825: GPU undervolt to 790mV 2024-12-18 15:01:20 +01:00
configs defconfigs: Regenerate with regen.sh 2025-01-18 22:53:46 +01:00
crypto Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
include arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry 2025-01-19 00:09:58 +01:00
kernel arm64: acpi: Move get_cpu_for_acpi_id() to a header 2025-01-19 00:09:58 +01:00
kvm KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE 2024-12-17 13:24:34 +01:00
lib arm64: Align __arch_clear_user() to 16 bytes as per upstream 2024-11-19 17:54:00 +01:00
mm arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs 2025-01-15 16:29:51 +01:00
net Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kbuild Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer 2024-11-18 11:43:21 +01:00
Kconfig.debug Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig.platforms Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile arm64: Force position-independent veneers 2024-11-23 23:22:00 +01:00
Makefile.postlink Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00