linux/drivers/mmc/core
Ulf Hansson 5fff08f459 mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card()
commit f04086c225 upstream.

During some scenarios mmc_sdio_init_card() runs a retry path for the UHS-I
specific initialization, which leads to removal of the previously allocated
card. A new card is then re-allocated while retrying.

However, in one of the corresponding error paths we may end up to remove an
already removed card, which likely leads to a NULL pointer exception. So,
let's fix this.

Fixes: 5fc3d80ef4 ("mmc: sdio: don't use rocr to check if the card could support UHS mode")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20200430091640.455-2-ulf.hansson@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-22 09:05:09 +02:00
..
block.c mmc: block: Fix use-after-free issue for rpmb 2020-06-03 08:19:37 +02:00
block.h
bus.c
bus.h
card.h
core.c mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard 2020-04-02 15:28:09 +02:00
core.h
debugfs.c
host.c mmc: core: fix possible use after free of host 2020-01-27 14:50:45 +01:00
host.h
Kconfig
Makefile
mmc_ops.c mmc: core: Allow host controllers to require R1B for CMD6 2020-04-02 15:28:09 +02:00
mmc_ops.h
mmc_test.c
mmc.c mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command 2020-04-02 15:28:09 +02:00
pwrseq_emmc.c
pwrseq_sd8787.c
pwrseq_simple.c
pwrseq.c
pwrseq.h
queue.c mmc: core: Fix recursive locking issue in CQE recovery path 2020-06-03 08:19:42 +02:00
queue.h
quirks.h mmc: core: fix wl1251 sdio quirks 2020-01-27 14:51:21 +01:00
sd_ops.c
sd_ops.h
sd.c
sd.h
sdio_bus.c
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c
sdio_irq.c
sdio_ops.c
sdio_ops.h
sdio_uart.c
sdio.c mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card() 2020-06-22 09:05:09 +02:00
slot-gpio.c
slot-gpio.h