Commit f3efb95
PCI: Fix lock symmetry in pci_slot_unlock()
The commit a4e7728 ("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: a4e7728 ("PCI: Add missing bridge lock to pci_bus_lock()")
Signed-off-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Lukas Wunner <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Cc: [email protected]
Link: https://patch.msgid.link/[email protected]1 parent 0af2f6b commit f3efb95
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5542 | 5542 | | |
5543 | 5543 | | |
5544 | 5544 | | |
5545 | | - | |
| 5545 | + | |
| 5546 | + | |
5546 | 5547 | | |
5547 | 5548 | | |
5548 | 5549 | | |
| |||
0 commit comments