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
..
2016-12-25 17:21:22 +01:00
2016-12-25 10:47:44 +01:00
2016-12-16 00:13:32 +02:00
2016-12-18 15:49:10 -08:00
2016-12-25 17:21:22 +01:00
2016-12-14 11:14:28 -08:00
2016-12-19 08:16:26 -08:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-22 10:19:32 -08:00
2016-12-25 10:47:44 +01:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-19 08:16:26 -08:00
2016-12-18 15:49:10 -08:00
2016-12-15 12:46:48 -08:00
2016-12-25 10:47:44 +01:00
2016-12-14 10:49:33 -08:00
2016-12-15 15:50:24 -08:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-15 11:45:13 -08:00
2016-12-19 08:16:26 -08:00
2016-12-15 16:03:25 -08:00
2016-12-13 08:52:45 -08:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-16 09:26:42 -08:00
2016-12-14 20:42:45 -08:00
2016-12-25 17:21:22 +01:00
2016-12-16 09:26:42 -08:00
2016-12-24 11:27:45 -08:00
2016-12-25 10:47:44 +01:00