90b5c1d7c4
If a PCI device and its parents are put into D3cold, unbinding the
device will trigger deadlock as follow:
- driver_unbind
- device_release_driver
- device_lock(dev) <--- previous lock here
- __device_release_driver
- pm_runtime_get_sync
...
- rpm_resume(dev)
- rpm_resume(dev->parent)
...
- pci_pm_runtime_resume
...
- pci_set_power_state
- __pci_start_power_transition
- pci_wakeup_bus(dev->parent->subordinate)
- pci_walk_bus
- device_lock(dev) <--- deadlock here
If we do not do device_lock in pci_walk_bus, we can avoid deadlock.
Device_lock in pci_walk_bus is introduced in commit:
|
||
---|---|---|
.. | ||
Kconfig | ||
Kconfig.debug | ||
Makefile | ||
aer_inject.c | ||
aerdrv.c | ||
aerdrv.h | ||
aerdrv_acpi.c | ||
aerdrv_core.c | ||
aerdrv_errprint.c | ||
ecrc.c |