mmc: core: Fix deadlock in suspend & rescan path
Due to deferred resume enabled ->
|
in system suspend
|
dpm_prepare
|
mmc_pm_notify with PREPARE_SUSPEND
This will return from here and will not wait
for mmc_rescan to complete.
Because of above system has deadlocked in which =>
mmc_rescan after acquiring device's mutex_lock, has
scheduled a work on WQ_FREEZABLE(bdi_wq) which will not run
since system freeze state has already completed.
This will only complete once tasks are unfreezed
which means only after system resume is completed.
And system suspend, is unpreparing the devices from dpm_prepared_list.
During which this process is trying to acquire card->device's mutex lock
which is held by above process. Thus a deadlock.
Change-Id: I926bb3783e62892ce842e5d4da44a3c24c8f244d
Signed-off-by:
Ritesh Harjani <riteshh@codeaurora.org>
Loading
Please register or sign in to comment