]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: Fix pci_slot_lock () device locking
authorKeith Busch <kbusch@kernel.org>
Fri, 30 Jan 2026 16:59:51 +0000 (08:59 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 6 Feb 2026 22:53:27 +0000 (16:53 -0600)
commit1f5e57c622b4dc9b8e7d291d560138d92cfbe5bf
tree7076eae7af9a31dbbabd59fdec94f5b9047fc3ec
parent9368d1ee62829b08aa31836b3ca003803caf0b72
PCI: Fix pci_slot_lock () device locking

Like pci_bus_lock(), pci_slot_lock() needs to lock the bridge device to
prevent warnings like:

  pcieport 0000:e2:05.0: unlocked secondary bus reset via: pciehp_reset_slot+0x55/0xa0

Take and release the lock for the bridge providing the slot for the
lock/trylock and unlock routines.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20260130165953.751063-3-kbusch@meta.com
drivers/pci/pci.c