linux-stable/drivers/pci
Alex Williamson ac91c87295 PCI: Fix "try" semantics of bus and slot reset
[ Upstream commit ddefc033ee ]

The commit referenced below introduced device locking around save and
restore of state for each device during a PCI bus "try" reset, making it
decidely non-"try" and prone to deadlock in the event that a device is
already locked.  Restore __pci_reset_bus() and __pci_reset_slot() to their
advertised locking semantics by pushing the save and restore functions into
the branch where the entire tree is already locked.  Extend the helper
function names with "_locked" and update the comment to reflect this
calling requirement.

Fixes: b014e96d1a ("PCI: Protect pci_error_handlers->reset_notify() usage with device_lock()")
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:30 +01:00
..
controller PCI: iproc: Remove PAXC slot check to allow VF support 2020-01-27 14:49:55 +01:00
endpoint PCI: endpoint: functions: Use memcpy_fromio()/memcpy_toio() 2020-01-27 14:50:23 +01:00
hotplug PCI: rpaphp: Correctly match ibm, my-drc-index to drc-name when using drc-info 2020-01-04 19:12:55 +01:00
pcie PCI/PTM: Remove spurious "d" from granularity message 2020-01-17 19:47:08 +01:00
switch switchtec: Remove immediate status check after submitting MRPC command 2020-01-27 14:50:05 +01:00
access.c
ats.c
bus.c
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Fix incorrect MSI-X masking on resume 2019-12-21 10:57:24 +01:00
of.c
pci-acpi.c ACPI/PCI: PM: Add missing wakeup.flags.valid checks 2019-06-22 08:15:17 +02:00
pci-driver.c PCI/PM: Always return devices to D0 when thawing 2019-12-21 10:57:22 +01:00
pci-label.c
pci-mid.c x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI: sysfs: Ignore lockdep for remove attribute 2019-07-31 07:27:02 +02:00
pci.c PCI: Fix "try" semantics of bus and slot reset 2020-01-27 14:50:30 +01:00
pci.h PCI/ERR: Use slot reset if available 2019-11-20 18:47:13 +01:00
probe.c PCI: Init PCIe feature bits for managed host bridge alloc 2019-05-25 18:23:37 +02:00
proc.c
quirks.c PCI: Apply Cavium ACS quirk to ThunderX2 and ThunderX3 2019-12-21 10:57:24 +01:00
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c PCI/ERR: Use slot reset if available 2019-11-20 18:47:13 +01:00
syscall.c
vc.c
vpd.c
xen-pcifront.c