Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: Hold invalidate_lock in BLKRESETZONE ioctl
When BLKRESETZONE ioctl and data read race, the data read leaves stale page cache. The commit e511350 ("block: Discard page cache of zone reset target range") added page cache truncation to avoid stale page cache after the ioctl. However, the stale page cache still can be read during the reset zone operation for the ioctl. To avoid the stale page cache completely, hold invalidate_lock of the block device file mapping. Fixes: e511350 ("block: Discard page cache of zone reset target range") Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Cc: [email protected] # v5.15 Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information