]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Avoid hanging to claim host for mmc via some nested calls
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 27 Feb 2018 10:49:09 +0000 (11:49 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 27 Feb 2018 14:12:37 +0000 (15:12 +0100)
commitbf0dc7b859d28ffc1ce9666ae5a6d1930cc2aa88
tree12b1bcfb3a04ec5ad64ef87e6a78c8f7edb90f54
parent6e18432fcebde2b709a5493a619e88b9370819f8
mmc: core: Avoid hanging to claim host for mmc via some nested calls

As the block layer, since the conversion to blkmq, claims the host using a
context, a following nested call to mmc_claim_host(), which isn't using a
context, may hang.

Calling mmc_interrupt_hpi() and mmc_read_bkops_status() via the mmc block
layer, may suffer from this problem, as these functions are calling
mmc_claim|release_host().

Let's fix the problem by removing the calls to mmc_claim|release_host()
from the above mentioned functions and instead make the callers responsible
of claiming/releasing the host. As a matter of fact, the existing callers
already deals with it.

Fixes: 1853d5e68fb8 ("mmc: block: Add blk-mq support")
Reported-by: Dmitry Osipenko <digetx@gmail.com>
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/core/mmc_ops.c