Re: [PATCH] loop: drop caches if offset or block_size are changed
From: Jens Axboe
Date: Wed Jan 09 2019 - 22:52:07 EST
On 1/9/19 8:17 PM, Jaegeuk Kim wrote:
> 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
Applied, thanks.
--
Jens Axboe