commit | d24cdbfd28b7e0ffecb1e281d73e73c03a57f734 | [log] [tgz] |
---|---|---|
author | Alex Williamson <alex.williamson@redhat.com> | Mon Jun 10 16:40:57 2013 -0600 |
committer | Alex Williamson <alex.williamson@redhat.com> | Wed Jul 24 16:36:41 2013 -0600 |
tree | 5121604d0025974356f09bb0027e018f1be05e03 | |
parent | c64019302bbb0b445484d870e674ab34a19a18a1 [diff] |
vfio-pci: Avoid deadlock on remove If an attempt is made to unbind a device from vfio-pci while that device is in use, the request is blocked until the device becomes unused. Unfortunately, that unbind path still grabs the device_lock, which certain things like __pci_reset_function() also want to take. This means we need to try to acquire the locks ourselves and use the pre-locked version, __pci_reset_function_locked(). Signed-off-by: Alex Williamson <alex.williamson@redhat.com>