]> git.baikalelectronics.ru Git - kernel.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>
Sat, 10 Dec 2011 21:18:39 +0000 (16:18 -0500)
commit99566de32b4658bc16923946b31e7bbee4a507d3
tree8e5e8779f9c3228b5a04044bc077b78eac456fc2
parent8888f6198ee43d6280460f8e0afff0630b45254b
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