Re: [PATCH v3] loop: drop caches if offset or block_size are changed

2019-01-09 Thread Bart Van Assche
On Tue, 2018-12-18 at 14:41 -0800, Jaegeuk Kim wrote: > [ ... ] Please post new versions of a patch as a new e-mail thread instead of as a reply to a previous e-mail. > [ ... ] > > if (lo->lo_offset != info->lo_offset || > lo->lo_sizelimit != info->lo_sizelimit) { > +

Re: [PATCH v3] loop: drop caches if offset or block_size are changed

2019-01-08 Thread Jaegeuk Kim
Hi Jens, May I ask whether this patch is acceptable? Thanks, On 12/18, 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

Re: [PATCH v3] loop: drop caches if offset or block_size are changed

2018-12-18 Thread Jaegeuk Kim
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