remarkable-linux/drivers/mmc/core
Bastian Stender 72439a30c0 mmc: block: fix updating ext_csd caches on ioctl call
commit e74ef2194b upstream.

PARTITION_CONFIG is cached in mmc_card->ext_csd.part_config and the
currently active partition in mmc_blk_data->part_curr. These caches do
not always reflect changes if the ioctl call modifies the
PARTITION_CONFIG registers, e.g. by changing BOOT_PARTITION_ENABLE.

Write the PARTITION_CONFIG value extracted from the ioctl call to the
cache and update the currently active partition accordingly. This
ensures that the user space cannot change the values behind the
kernel's back. The next call to mmc_blk_part_switch() will operate on
the data set by the ioctl and reflect the changes appropriately.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28 18:24:31 +02:00
..
block.c mmc: block: fix updating ext_csd caches on ioctl call 2018-03-28 18:24:31 +02:00
block.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bus.c mmc: core: Do not leave the block driver in a suspended state 2017-12-05 11:26:32 +01:00
bus.h mmc: core: Move public functions from card.h to private headers 2017-02-13 13:20:24 +01:00
card.h mmc: core: Disable HPI for certain Micron (Numonyx) eMMC cards 2018-03-28 18:24:31 +02:00
core.c mmc: avoid removing non-removable hosts during suspend 2018-03-24 11:01:24 +01:00
core.h mmc: core: Move mmc_start_areq() declaration 2017-08-30 15:03:53 +02:00
debugfs.c mmc: block: Ensure that debugfs files are removed 2017-12-05 11:26:33 +01:00
host.c mmc: core: Add mmc_retune_hold_now() 2017-08-30 14:02:01 +02:00
host.h mmc: core: Add mmc_retune_hold_now() 2017-08-30 14:02:01 +02:00
Kconfig mmc: core: Delete bounce buffer Kconfig option 2017-06-20 10:30:17 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmc.c mmc: core: prepend 0x to OCR entry in sysfs 2017-12-05 11:26:33 +01:00
mmc_ops.c mmc: ops: export mmc_get_status() 2017-08-30 15:03:39 +02:00
mmc_ops.h mmc: core: Re-factor code for sending CID 2017-06-20 10:30:45 +02:00
mmc_test.c mmc: mmc_test: Ensure command queue is disabled for testing 2018-03-19 08:42:56 +01:00
pwrseq.c mmc: pwrseq: Add reset callback to the struct mmc_pwrseq_ops 2017-06-20 10:30:09 +02:00
pwrseq.h mmc: pwrseq: Add reset callback to the struct mmc_pwrseq_ops 2017-06-20 10:30:09 +02:00
pwrseq_emmc.c mmc: core: Don't do eMMC HW reset when resuming the eMMC card 2017-06-20 10:30:10 +02:00
pwrseq_sd8787.c mmc: pwrseq: add support for Marvell SD8787 chip 2017-02-13 13:20:33 +01:00
pwrseq_simple.c mmc: pwrseq_simple: Parse DTS for the power-off-delay-us property 2017-05-23 14:17:36 +02:00
queue.c mmc: Delete bounce buffer handling 2017-10-04 10:22:55 +02:00
queue.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
quirks.h mmc: core: Disable HPI for certain Micron (Numonyx) eMMC cards 2018-03-28 18:24:31 +02:00
sd.c mmc: core: prepend 0x to OCR entry in sysfs 2017-12-05 11:26:33 +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 mmc: core: add proper be32 annotation 2017-04-24 21:42:19 +02:00
sd_ops.h mmc: core: add proper be32 annotation 2017-04-24 21:42:19 +02:00
sdio.c mmc: sdio: Keep card runtime resumed while adding function devices 2017-06-20 10:30:39 +02:00
sdio_bus.c mmc: sdio: fix alignment issue in struct sdio_func 2017-04-18 19:18:07 +02:00
sdio_bus.h mmc: core: First step in cleaning up private mmc header files 2017-02-13 13:20:20 +01:00
sdio_cis.c mmc: core: remove BUG_ONs from sdio 2016-12-05 10:31:08 +01:00
sdio_cis.h mmc: core: First step in cleaning up private mmc header files 2017-02-13 13:20:20 +01:00
sdio_io.c mmc: core: simplify return code 2017-04-24 21:41:24 +02:00
sdio_irq.c mmc: sdio: Add API to manage SDIO IRQs from a workqueue 2017-06-20 10:30:11 +02:00
sdio_ops.c mmc: sdio: improve mmc_io_rw_extended 2017-04-24 21:41:42 +02:00
sdio_ops.h mmc: sdio: Add API to manage SDIO IRQs from a workqueue 2017-06-20 10:30:11 +02:00
sdio_uart.c mmc: block: Move files to core 2016-12-12 16:30:05 +01:00
slot-gpio.c mmc: slot-gpio: Add support to enable irq wake on cd_irq 2017-06-20 10:30:49 +02:00
slot-gpio.h mmc: core: First step in cleaning up private mmc header files 2017-02-13 13:20:20 +01:00