mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 13:03:25 +01:00
78a0055555
kvm_vgic_map_resources() prematurely marks the distributor as 'ready',
potentially allowing vCPUs to enter the guest before the distributor's
MMIO registration has been made visible.
Plug the race by marking the distributor as ready only after MMIO
registration is completed. Rely on the implied ordering of
synchronize_srcu() to ensure the MMIO registration is visible before
vgic_dist::ready. This also means that writers to vgic_dist::ready are
now serialized by the slots_lock, which was effectively the case already
as all writers held the slots_lock in addition to the config_lock.
Fixes:
|
||
---|---|---|
.. | ||
hyp | ||
vgic | ||
.gitignore | ||
arch_timer.c | ||
arm.c | ||
at.c | ||
debug.c | ||
emulate-nested.c | ||
fpsimd.c | ||
guest.c | ||
handle_exit.c | ||
hypercalls.c | ||
inject_fault.c | ||
Kconfig | ||
Makefile | ||
mmio.c | ||
mmu.c | ||
nested.c | ||
pauth.c | ||
pkvm.c | ||
pmu-emul.c | ||
pmu.c | ||
psci.c | ||
ptdump.c | ||
pvtime.c | ||
reset.c | ||
stacktrace.c | ||
sys_regs.c | ||
sys_regs.h | ||
trace.h | ||
trace_arm.h | ||
trace_handle_exit.h | ||
trng.c | ||
va_layout.c | ||
vgic-sys-reg-v3.c | ||
vmid.c |