linux-stable/drivers/mmc
Bastian Stender e74ef2194b mmc: block: fix updating ext_csd caches on ioctl call
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>
2018-03-15 10:31:38 +01:00
..
core mmc: block: fix updating ext_csd caches on ioctl call 2018-03-15 10:31:38 +01:00
host mmc: dw_mmc: Fix the DTO/CTO timeout overflow calculation for 32-bit systems 2018-03-05 09:36:17 +01:00
Kconfig mmc: core: Remove option not to use blk-mq 2017-12-11 12:55:02 +01:00
Makefile mmc: Kconfig: downgrade CONFIG_MMC_DEBUG for host drivers only 2017-08-30 14:01:34 +02:00