Skip to content
Commit d24cdbfd authored by Alex Williamson's avatar Alex Williamson
Browse files

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: default avatarAlex Williamson <alex.williamson@redhat.com>
parent c6401930
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment