Loading
msm: pci : Avoid deadlock with recovery and enemurate lock
Avoid deadlock scenario when wake interrupt arrives at enumeration
time and holds recovery lock and wake handler workqueue tries to
acquire enumeration lock. In parallel client driver can call
msm_pcie_pm_control for suspend where enumeration lock could
be successfully acquired by msm_pcie_pm_control instead by wake
handler and waiting for recovery lock which is currently acquired
by wake handler (which is currently waiting for enumertion lock)
which could leads to deadlock scenario.
msm_pcie_enumerate wake handler pm_control
| | (suspend thread)
| | |
| x acquired |
x acquired | recovery lock |
| enumerate lock | |
| o waiting for |
| enumerate lock |
x released x acquired
| enumerate lock | enumerate lock
|
o waiting for
recovery lock
we have fixed the order of locking in msm_pcie_pm_control to avoid
deadlock scenario.
Change-Id: Ifc72c643f7c0793cfa10a953723e953ce73a82b6
Signed-off-by:
Vivek Pernamitta <vpernami@codeaurora.org>