summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-04-17 21:46:44 -0600
committerBen Hutchings <ben@decadent.org.uk>2012-05-31 00:43:11 +0100
commit50fcec93e8c917b4f6e1a3219207d351e6eae1b2 (patch)
tree1774342585bbae71bb540985dee995477b3ba661 /arch
parent645b177cbfce6b695bdbe0b4c131de584821840d (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> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions