diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-10-07 22:37:34 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-08 10:08:37 +0100 |
commit | df0c2d409e9d3159724b206da7e7e697fb5874eb (patch) | |
tree | 3dff3092d2e3ed9a1a70313153062f08845c1f65 /drivers/tty/n_hdlc.c | |
parent | 8e5ca01ac966b91818c9612cc3f988538a261ef2 (diff) |
PCI: Avoid possible deadlock on pci_lock and p->pi_lock
[ Upstream commit cdcb33f9824429a926b971bf041a6cec238f91ff ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_hdlc.c')
0 files changed, 0 insertions, 0 deletions