linux/arch/arm64
Mark Salter 982d8d92f2 arm64: fix NULL dereference in have_cpu_die()
commit 335d2c2d19 upstream.

Commit 5c492c3f52 ("arm64: smp: Add function to determine if cpus are
stuck in the kernel") added a helper function to determine if die() is
supported in cpu_ops. This function assumes a cpu will have a valid
cpu_ops entry, but that may not be the case for cpu0 is spin-table or
parking protocol is used to boot secondary cpus. In that case, there
is a NULL dereference if have_cpu_die() is called by cpu0. So add a
check for a valid cpu_ops before dereferencing it.

Fixes: 5c492c3f52 ("arm64: smp: Add function to determine if cpus are stuck in the kernel")
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-07-05 14:40:31 +02:00
..
boot ARM64: dts: meson-gxbb-odroidc2: fix GbE tx link breakage 2017-07-05 14:40:20 +02:00
configs ZTE arm64 defconfig updates for 4.9: 2016-09-19 22:35:21 +02:00
crypto crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes 2017-02-09 08:08:26 +01:00
include ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation 2017-07-05 14:40:29 +02:00
kernel arm64: fix NULL dereference in have_cpu_die() 2017-07-05 14:40:31 +02:00
kvm arm64: KVM: Allow unaligned accesses at EL2 2017-06-14 15:05:56 +02:00
lib Merge branch 'work.uaccess' into for-linus 2016-10-14 20:42:44 -04:00
mm arm64: mm: unaligned access by user-land should be received as SIGBUS 2017-04-12 12:41:11 +02:00
net bpf, arm64: fix faulty emission of map access in tail calls 2017-06-07 12:07:43 +02:00
xen arm/xen: add support for vm_assist hypercall 2016-07-06 10:42:14 +01:00
Kconfig irqchip/gicv3-its: Add workaround for QDF2400 ITS erratum 0065 2017-03-22 12:43:39 +01:00
Kconfig.debug arm64: always enable DEBUG_RODATA and remove the Kconfig option 2016-08-26 10:13:41 +01:00
Kconfig.platforms arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER 2016-10-22 18:25:52 +09:00
Makefile arm64: kernel: force ET_DYN ELF type for CONFIG_RELOCATABLE=y 2016-10-20 11:37:25 +01:00