summaryrefslogtreecommitdiffstats
path: root/drivers/block/ps3vram.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2019-01-10 04:17:14 +0100
committerJens Axboe <axboe@kernel.dk>2019-01-10 04:51:44 +0100
commit5db470e229e22b7eda6e23b5566e532c96fb5bc3 (patch)
tree31e105772718f33a0e7baf9f0e06ac4e5def9b2c /drivers/block/ps3vram.c
parentblock: fix kerneldoc comment for blk_attempt_plug_merge() (diff)
downloadlinux-5db470e229e22b7eda6e23b5566e532c96fb5bc3.tar.xz
linux-5db470e229e22b7eda6e23b5566e532c96fb5bc3.zip
loop: drop caches if offset or block_size are changed
If we don't drop caches used in old offset or block_size, we can get old data from new offset/block_size, which gives unexpected data to user. For example, Martijn found a loopback bug in the below scenario. 1) LOOP_SET_FD loads first two pages on loop file 2) LOOP_SET_STATUS64 changes the offset on the loop file 3) mount is failed due to the cached pages having wrong superblock Cc: Jens Axboe <axboe@kernel.dk> Cc: linux-block@vger.kernel.org Reported-by: Martijn Coenen <maco@google.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/ps3vram.c')
0 files changed, 0 insertions, 0 deletions