diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2018-01-11 14:09:11 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-01-18 20:57:17 +0100 |
commit | 721c7fc701c71f693307d274d2b346a1ecd4a534 (patch) | |
tree | 02b8934cb55c6b00a533c536419e2d157d18917b /block/Makefile | |
parent | blk-throttle: export io_serviced_recursive, io_service_bytes_recursive (diff) | |
download | linux-721c7fc701c71f693307d274d2b346a1ecd4a534.tar.xz linux-721c7fc701c71f693307d274d2b346a1ecd4a534.zip |
block: fail op_is_write() requests to read-only partitions
Regular block device writes go through blkdev_write_iter(), which does
bdev_read_only(), while zeroout/discard/etc requests are never checked,
both userspace- and kernel-triggered. Add a generic catch-all check to
generic_make_request_checks() to actually enforce ioctl(BLKROSET) and
set_disk_ro(), which is used by quite a few drivers for things like
snapshots, read-only backing files/images, etc.
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/Makefile')
0 files changed, 0 insertions, 0 deletions