diff options
| author | Alex Williamson <[email protected]> | 2012-04-18 03:46:44 +0000 |
|---|---|---|
| committer | Marcelo Tosatti <[email protected]> | 2012-04-19 03:04:18 +0000 |
| commit | 21a1416a1c945c5aeaeaf791b63c64926018eb77 (patch) | |
| tree | 4a6ac6aae66648bba9de57902ec98dfa5ae9b98d /lib/mpi/mpiutil.c | |
| parent | KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context (diff) | |
| download | kernel-21a1416a1c945c5aeaeaf791b63c64926018eb77.tar.gz kernel-21a1416a1c945c5aeaeaf791b63c64926018eb77.zip | |
KVM: lock slots_lock around device assignment
As pointed out by Jason Baron, when assigning a device to a guest
we first set the iommu domain pointer, which enables mapping
and unmapping of memory slots to the iommu. This leaves a window
where this path is enabled, but we haven't synchronized the iommu
mappings to the existing memory slots. Thus a slot being removed
at that point could send us down unexpected code paths removing
non-existent pinnings and iommu mappings. Take the slots_lock
around creating the iommu domain and initial mappings as well as
around iommu teardown to avoid this race.
Signed-off-by: Alex Williamson <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions
