]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined
authorSujit Reddy Thumma <sthumma@codeaurora.org>
Wed, 23 Nov 2011 03:13:18 +0000 (08:43 +0530)
committerChris Ball <cjb@laptop.org>
Thu, 1 Dec 2011 18:59:39 +0000 (13:59 -0500)
commit32b12e6139cb12742581e94d59f540a70783b949
tree7af1f2aee40b2110ff5442685bc4d08f17b9a6a1
parent73d3b7456a20d46f2248440f903c49dce7605057
mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined

mmc_suspend_host() tries to claim host during suspend
and release it only when the bus suspend operation is
compeleted. If CONFIG_MMC_UNSAFE_RESUME is defined and
the host is flagged as removable, mmc_suspend_host()
tries to remove the card. In this process, the file system
sync can get blocked trying to acquire host which is already
claimed by mmc_suspend_host() causing deadlock.

Fix this deadlock by releasing host before ->remove() is called.

Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/core.c