mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: 81196976ed ("mmc: block: Add blk-mq support")
Reported-by: Dmitry Osipenko <[email protected]>
Suggested-by: Adrian Hunter <[email protected]>
Tested-by: Dmitry Osipenko <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Reviewed-by: Shawn Lin <[email protected]>
This commit is contained in:
parent
5b43df8b4c
commit
3a574919f0
1 changed files with 0 additions and 4 deletions
|
|
@ -848,7 +848,6 @@ int mmc_interrupt_hpi(struct mmc_card *card)
|
|||
return 1;
|
||||
}
|
||||
|
||||
mmc_claim_host(card->host);
|
||||
err = mmc_send_status(card, &status);
|
||||
if (err) {
|
||||
pr_err("%s: Get card status fail\n", mmc_hostname(card->host));
|
||||
|
|
@ -890,7 +889,6 @@ int mmc_interrupt_hpi(struct mmc_card *card)
|
|||
} while (!err);
|
||||
|
||||
out:
|
||||
mmc_release_host(card->host);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -932,9 +930,7 @@ static int mmc_read_bkops_status(struct mmc_card *card)
|
|||
int err;
|
||||
u8 *ext_csd;
|
||||
|
||||
mmc_claim_host(card->host);
|
||||
err = mmc_get_ext_csd(card, &ext_csd);
|
||||
mmc_release_host(card->host);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue