Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 562dd2c5 authored by Ritesh Harjani's avatar Ritesh Harjani
Browse files

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: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent ba7086c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment