]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
vfio-pci: Use pci "try" reset interface
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 15 Jan 2014 03:45:09 +0000 (20:45 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 15 Jan 2014 17:43:17 +0000 (10:43 -0700)
commit890ed578df82f5b7b5a874f9f2fa4f117305df5f
tree8105161071fa46a98feea8253f407adb71f1e242
parent61cf16d8bd38c3dc52033ea75d5b1f8368514a17
vfio-pci: Use pci "try" reset interface

PCI resets will attempt to take the device_lock for any device to be
reset.  This is a problem if that lock is already held, for instance
in the device remove path.  It's not sufficient to simply kill the
user process or skip the reset if called after .remove as a race could
result in the same deadlock.  Instead, we handle all resets as "best
effort" using the PCI "try" reset interfaces.  This prevents the user
from being able to induce a deadlock by triggering a reset.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/vfio/pci/vfio_pci.c