vfio: Use down_reads to protect iommu disconnects
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 29 Apr 2013 14:41:36 +0000 (08:41 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 29 Apr 2013 14:41:36 +0000 (08:41 -0600)
commit0b43c082338b857c27d2f87c886eb78812ccd236
tree4692c09a3ba9b7efb9eff3000f17d8bdbde00630
parent9587f44aa69a4cfb13701b31a633852684bed701
vfio: Use down_reads to protect iommu disconnects

If a group or device is released or a container is unset from a group
it can race against file ops on the container.  Protect these with
down_reads to allow concurrent users.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reported-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vfio/vfio.c