linux/drivers/pci
Bjorn Helgaas cdcb33f982 PCI: Avoid possible deadlock on pci_lock and p->pi_lock
pci_lock is an IRQ-safe spinlock that protects all accesses to PCI
configuration space (see PCI_OP_READ() and PCI_OP_WRITE() in pci/access.c).

The pci_cfg_access_unlock() path acquires pci_lock, then p->pi_lock (inside
wake_up_all()).  According to lockdep, there is a possible path involving
snbep_uncore_pci_read_counter() that could acquire them in the reverse
order: acquiring p->pi_lock, then pci_lock, which could result in a
deadlock.  Lockdep details are in the bugzilla below.

Avoid the possible deadlock by dropping pci_lock before waking up any
config access waiters.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=192901
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2017-01-30 16:55:33 -06:00
..
host pci-v4.10-changes 2016-12-15 12:46:48 -08:00
hotplug Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
pcie pci-v4.10-changes 2016-12-15 12:46:48 -08:00
access.c PCI: Avoid possible deadlock on pci_lock and p->pi_lock 2017-01-30 16:55:33 -06:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
ecam.c PCI: Add MCFG quirks for Qualcomm QDF2432 host controller 2016-12-06 13:45:49 -06:00
host-bridge.c cxl: use pcibios_free_controller_deferred() when removing vPHBs 2016-08-22 11:09:33 +10:00
hotplug-pci.c
htirq.c
iov.c PCI: Remove pci_resource_bar() and pci_iov_resource_bar() 2016-11-29 18:05:09 -06:00
irq.c
Kconfig PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for ARC 2016-09-06 10:53:32 -05:00
Makefile x86/platform/intel-mid: Add Power Management Unit driver 2016-06-15 10:10:49 +02:00
msi.c pci-v4.10-changes 2016-12-15 12:46:48 -08:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c Merge branch 'pci/pm' into next 2016-12-12 11:25:04 -06:00
pci-driver.c Merge branch 'pci/pm' into next 2016-10-03 09:43:21 -05:00
pci-label.c PCI: Fix broken URL for Dell biosdevname 2016-02-29 12:03:19 -06:00
pci-mid.c pci-v4.10-changes 2016-12-15 12:46:48 -08:00
pci-stub.c
pci-sysfs.c PCI: Create revision file in sysfs 2016-11-21 16:25:32 -06:00
pci.c Merge branch 'pci/virtualization' into next 2016-12-12 11:25:05 -06:00
pci.h Merge branch 'pci/virtualization' into next 2016-12-12 11:25:05 -06:00
probe.c PCI: Apply _HPX settings only to relevant devices 2017-01-02 15:56:25 -06:00
proc.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
quirks.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
remove.c PCI: Autosense device removal in pci_bridge_d3_update() 2016-11-17 18:44:56 -06:00
rom.c PCI: Add comments about ROM BAR updating 2016-11-29 18:05:09 -06:00
search.c PCI: Add support for multiple DMA aliases 2016-04-11 14:34:32 -05:00
setup-bus.c x86/ioapic: Ignore root bridges without a companion ACPI device 2016-09-10 20:30:31 +02:00
setup-irq.c
setup-res.c Merge branch 'pci/host-rockchip' into next 2016-12-12 11:25:11 -06:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
vc.c PCI: Fix unaligned accesses in VC code 2016-06-20 13:24:20 -05:00
vpd.c
xen-pcifront.c xen: make use of xenbus_read_unsigned() in xen-pcifront 2016-11-07 13:55:26 +01:00