linux-stable/drivers/mmc/core
Adrian Hunter c077dc5e06 mmc: block: Fix request completion in the CQE timeout path
First, it should be noted that the CQE timeout (60 seconds) is substantial
so a CQE request that times out is really stuck, and the race between
timeout and completion is extremely unlikely. Nevertheless this patch
fixes an issue with it.

Commit ad73d6fead ("mmc: complete requests from ->timeout")
preserved the existing functionality, to complete the request.
However that had only been necessary because the block layer
timeout handler had been marking the request to prevent it from being
completed normally. That restriction was removed at the same time, the
result being that a request that has gone will have been completed anyway.
That is, the completion was unnecessary.

At the time, the unnecessary completion was harmless because the block
layer would ignore it, although that changed in kernel v5.0.

Note for stable, this patch will not apply cleanly without patch "mmc:
core: Fix recursive locking issue in CQE recovery path"

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: ad73d6fead ("mmc: complete requests from ->timeout")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200508062227.23144-1-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2020-05-08 10:15:51 +02:00
..
block.c mmc: core: Check request type before completing the request 2020-05-08 07:30:05 +02:00
block.h mmc: block: Remove code no longer needed after the switch to blk-mq 2017-12-11 13:02:22 +01:00
bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
card.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
core.c mmc: core: Re-work the code for eMMC sanitize 2020-03-26 14:45:31 +01:00
core.h mmc: core: Re-work HW reset for SDIO cards 2019-11-14 16:28:56 +01:00
debugfs.c MMC core: 2019-07-11 18:11:21 -07:00
host.c mmc: core: Remove mmc_gpiod_request_*(invert_gpio) 2019-12-18 13:37:07 +01:00
host.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile mmc: core: Move regulator helpers to separate file 2019-02-25 15:20:58 +01:00
mmc.c mmc: core: Drop redundant in-parameter to __mmc_switch() 2020-03-24 14:35:39 +01:00
mmc_ops.c mmc: core: make mmc_interrupt_hpi() static 2020-04-20 09:24:39 +02:00
mmc_ops.h mmc: core: Re-work the code for eMMC sanitize 2020-03-26 14:45:31 +01:00
mmc_test.c mmc: mmc_test: Pass different sg lists for non-blocking requests 2020-03-24 14:35:42 +01:00
pwrseq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwrseq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwrseq_emmc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
pwrseq_sd8787.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
pwrseq_simple.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
queue.c mmc: block: Fix request completion in the CQE timeout path 2020-05-08 10:15:51 +02:00
queue.h mmc: stop abusing the request queue_lock pointer 2018-11-17 07:20:45 -07:00
quirks.h mmc: core: fix wl1251 sdio quirks 2019-11-15 09:59:19 +01:00
regulator.c mmc: core: Convert mmc_regulator_get_ocrmask() to static 2019-02-25 15:20:58 +01:00
sd.c mmc: core: Enable the MMC host software queue for the SD card 2020-03-24 14:35:39 +01:00
sd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sd_ops.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sd_ops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio.c mmc: core: Re-work HW reset for SDIO cards 2019-11-14 16:28:56 +01:00
sdio_bus.c mmc: core: Re-work HW reset for SDIO cards 2019-11-14 16:28:56 +01:00
sdio_bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_cis.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_cis.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_io.c mmc: core: Add sdio_retune_hold_now() and sdio_retune_release() 2019-06-18 13:30:32 +02:00
sdio_irq.c mmc: core: Fix indentation 2020-03-24 14:35:42 +01:00
sdio_ops.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_ops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sdio_uart.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
slot-gpio.c mmc: core: Remove mmc_gpiod_request_*(invert_gpio) 2019-12-18 13:37:07 +01:00
slot-gpio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00