On Mon, May 05, 2025 at 02:54:12PM +0300, Ilpo Järvinen wrote: > The commit a4e772898f8b ("PCI: Add missing bridge lock to > pci_bus_lock()") made the lock function to call depend on > dev->subordinate but left pci_slot_unlock() unmodified creating locking > asymmetry compared with pci_slot_lock(). > > Because of the asymmetric lock handling, the same bridge device is > unlocked twice. First pci_bus_unlock() unlocks bus->self and then > pci_slot_unlock() will unconditionally unlock the same bridge device. > > Move pci_dev_unlock() inside an else branch to match the logic in > pci_slot_lock(). > > Fixes: a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()") > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> > Cc: <stable@xxxxxxxxxxxxxxx> Reviewed-by: Lukas Wunner <lukas@xxxxxxxxx>