]> git.karo-electronics.de Git - linux-beck.git/commit
vfio-pci: Use mutex around open, release, and remove
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 7 Aug 2014 17:12:04 +0000 (11:12 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 7 Aug 2014 17:12:04 +0000 (11:12 -0600)
commit61d792562b53c610f9fe917f2bbc22218aa39c22
tree639616536bce3e1855e24b8c240f688b7e62f283
parent9c22e660ce8105debb497933b9900eaeb40836d2
vfio-pci: Use mutex around open, release, and remove

Serializing open/release allows us to fix a refcnt error if we fail
to enable the device and lets us prevent devices from being unbound
or opened, giving us an opportunity to do bus resets on release.  No
restriction added to serialize binding devices to vfio-pci while the
mutex is held though.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci.c
drivers/vfio/pci/vfio_pci_private.h