linux/virt/kvm/arm
Heyi Guo d4a8061a7c KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long
If the ap_list is longer than 256 entries, merge_final() in list_sort()
will call the comparison callback with the same element twice, causing
a deadlock in vgic_irq_cmp().

Fix it by returning early when irqa == irqb.

Cc: stable@vger.kernel.org # 4.7+
Fixes: 8e44474579 ("KVM: arm/arm64: vgic-new: Add IRQ sorting")
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Heyi Guo <guoheyi@huawei.com>
[maz: massaged commit log and patch, added Fixes and Cc-stable]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
2019-08-27 16:19:56 +01:00
..
hyp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
vgic KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long 2019-08-27 16:19:56 +01:00
aarch32.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
arch_timer.c KVM: arm64: Migrate _elx sysreg accessors to msr_s/mrs_s 2019-07-05 13:57:25 +01:00
arm.c Documentation: move Documentation/virtual to Documentation/virt 2019-07-24 10:52:11 +02:00
mmio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 266 2019-06-05 17:30:28 +02:00
mmu.c arm64: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
perf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
pmu.c KVM: arm/arm64: Support chained PMU counters 2019-07-05 13:56:22 +01:00
psci.c KVM: arm/arm64: Add save/restore support for firmware workaround state 2019-07-05 13:56:27 +01:00
trace.h KVM: arm/arm64: Fix TRACE_INCLUDE_PATH 2019-02-19 21:05:51 +00:00