kernel_samsung_a53x/arch/arm64
Jonathan Cameron c71f1763b9 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>
2024-11-23 23:21:08 +01:00
..
boot ARM64: boot: dts: Use always-y 2024-06-15 16:28:20 -03:00
configs Added KernelSU 2024-11-19 22:44:48 +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 2024-11-23 23:21:08 +01:00
kernel arm64: acpi: Move get_cpu_for_acpi_id() to a header 2024-11-23 23:21:08 +01:00
kvm KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 2024-11-23 23:20:50 +01:00
lib arm64: Align __arch_clear_user() to 16 bytes as per upstream 2024-11-19 17:54:00 +01:00
mm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03: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: boot: Select Image as default target 2024-06-15 16:21:19 -03:00
Makefile.postlink Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00