summaryrefslogtreecommitdiff
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-12-14 11:14:38 -0800
committerAlistair Delva <adelva@google.com>2020-05-02 16:31:23 +0000
commitdb4b201bdbeea31ec4bfd6b5bd41ec9a12a5285c (patch)
tree8feea620cbad51862e31e4901cd145feb47cb952 /fs/pnode.c
parent6b9a1ab9e65edfd1cea1d76ef7ed8de247f4c338 (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 'fs/pnode.c')
0 files changed, 0 insertions, 0 deletions