linux/drivers/mmc/card
Shawn Lin 83c742c344 mmc: block: fix ABI regression of mmc_blk_ioctl
If mmc_blk_ioctl returns -EINVAL, blkdev_ioctl continues to
work without returning err to user-space. But now we check
CAP_SYS_RAWIO firstly, so we return -EPERM to blkdev_ioctl,
which make blkdev_ioctl return -EPERM to user-space directly.
So this will break all the ioctl with BLKROSET. Now we find
Android-adb suffer it for the following log:

remount of /system failed;
couldn't make block device writable: Operation not permitted
openat(AT_FDCWD, "/dev/block/platform/ff420000.dwmmc/by-name/system", O_RDONLY) = 3
ioctl(3, BLKROSET, 0)  = -1 EPERM (Operation not permitted)

Fixes: a5f5774c55 ("mmc: block: Add new ioctl to send multi commands")
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-03-17 14:54:42 +01:00
..
block.c mmc: block: fix ABI regression of mmc_blk_ioctl 2016-03-17 14:54:42 +01:00
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile mmc: Makefile: Fix EXTRA_CFLAGS assignment 2010-10-23 21:11:15 +08:00
mmc_test.c mmc: mmc_test: mention that '0' runs all tests 2016-02-29 11:02:54 +01:00
queue.c scatterlist: remove open coded sg_unmark_end instances 2015-08-17 08:12:56 -06:00
queue.h mmc: block: Retry errored data requests when re-tuning is needed 2015-06-01 09:06:59 +02:00
sdio_uart.c mmc: Convert pr_warning to pr_warn 2014-09-24 10:13:09 +02:00