PCI: Fix missing update in pci_slot_unlock() after locking changes
PATCH 1/1 PCI: Fix missing update in pci_slot_unlock() after locking changes
The cited patch updated pci_slot_lock(), pci_slot_trylock(), pci_bus_lock(), and pci_bus_trylock() recursive locking, and adjusted pci_bus_unlock() accordingly. However, it missed updating pci_slot_unlock(), which may lead to attempting to unlock the subordinate bridge's device lock twice.
--- drivers/pci/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/pci.c +2 -1
@@ -5542,7 +5542,8 @@ static void pci_slot_unlock(struct pci_slot *slot)continue ;if (dev->subordinate)pci_bus_unlock (dev->subordinate); -pci_dev_unlock (dev); +else +pci_dev_unlock (dev); } }
Signature · 1 line
2.18.2
Quoted 8 lines · Moshe Shemesh
The cited patch updated
pci_slot_lock(),pci_slot_trylock(),pci_bus_lock(), andpci_bus_trylock()recursive locking, and adjustedpci_bus_unlock()accordingly. However, it missed updatingpci_slot_unlock(), which may lead to attempting to unlock the subordinate bridge's device lock twice.Fixes a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()")Signed-off-by Moshe Shemesh <[email protected]>
Ilpo already submitted an identical patch on April 30:
Quoted 8 lines · Lukas Wunner
Quoted 6 lines · Moshe Shemesh
The cited patch updated
pci_slot_lock(),pci_slot_trylock(),pci_bus_lock(), andpci_bus_trylock()recursive locking, and adjustedpci_bus_unlock()accordingly. However, it missed updatingpci_slot_unlock(), which may lead to attempting to unlock the subordinate bridge's device lock twice.
Quoted 6 lines
Quoted 2 lines
Fixes a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()")Signed-off-by Moshe Shemesh <[email protected]>Ilpo already submitted an identical patch on April 30:
I missed it, thanks.