summaryrefslogtreecommitdiff
path: root/include/linux/backing-dev-defs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-12-14 11:14:38 -0800
committerAlistair Strachan <astrachan@google.com>2019-01-18 22:20:14 +0000
commit3fcfb1ac66997546f25f41ce40da0ff158e59b2d (patch)
treea50955d3db51da16885ba10ccdab3824dc60e08a /include/linux/backing-dev-defs.h
parentb355d4f7ce55352f5b025306e2113f2f98302a6b (diff)
UPSTREAM: 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> (cherry picked from commit 490b8c65b9db45896769e1095e78725775f47b3e) Change-Id: Iffb7e1f04ab587e1a8785bc862a425efb654be24
Diffstat (limited to 'include/linux/backing-dev-defs.h')
0 files changed, 0 insertions, 0 deletions