1
0
Fork 0
remarkable-linux/virt/kvm
Christoffer Dall f3662e3325 KVM: arm/arm64: Fix vgic init race
[ Upstream commit 1d47191de7 ]

The vgic_init function can race with kvm_arch_vcpu_create() which does
not hold kvm_lock() and we therefore have no synchronization primitives
to ensure we're doing the right thing.

As the user is trying to initialize or run the VM while at the same time
creating more VCPUs, we just have to refuse to initialize the VGIC in
this case rather than silently failing with a broken VCPU.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:38:04 +02:00
..
arm KVM: arm/arm64: Fix vgic init race 2018-09-26 08:38:04 +02:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
async_pf.c kvm,async_pf: Use swq_has_sleeper() 2017-09-15 16:57:11 +02:00
async_pf.h KVM: fix checkpatch.pl errors in kvm/async_pf.h 2015-06-19 17:16:25 +02:00
coalesced_mmio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
coalesced_mmio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
eventfd.c KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer 2018-08-24 13:09:21 +02:00
irqchip.c KVM: use rcu access function for irq routing 2017-07-07 15:24:15 +02:00
kvm_main.c kvm: Map PFN-type memory regions as writable (if possible) 2018-04-26 11:02:13 +02:00
vfio.c vfio: New external user group/file match 2017-06-28 13:50:05 -06:00
vfio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00