diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2012-05-09 16:10:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-12 09:32:20 -0700 |
commit | fecc7cbae16b25401cd6d53dda8fb8fcc1b1ec4f (patch) | |
tree | f304210ee42fdfb26acfb69c2cab1f4d5c1a771e /Documentation | |
parent | a4dfde33d7f8448d65d066392ecccbbf50d55fd8 (diff) |
KVM: lock slots_lock around device assignment
(cherry picked from commit 21a1416a1c945c5aeaeaf791b63c64926018eb77)
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 <alex.williamson@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions