summaryrefslogtreecommitdiff
path: root/block/opal_proto.h
diff options
context:
space:
mode:
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>2021-11-11 11:52:38 +0300
committerJens Axboe <axboe@kernel.dk>2021-11-11 21:52:46 +0300
commit86399ea071099ec8ee0a83ac9ad67f7df96a50ad (patch)
tree5c5352e8e1bc89aa6f832c02a088a96368c074a0 /block/opal_proto.h
parentb131f2011115f3c18a49e17762486501496fea3c (diff)
downloadlinux-86399ea071099ec8ee0a83ac9ad67f7df96a50ad.tar.xz
block: Hold invalidate_lock in BLKRESETZONE ioctl
When BLKRESETZONE ioctl and data read race, the data read leaves stale page cache. The commit e5113505904e ("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: e5113505904e ("block: Discard page cache of zone reset target range") Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Cc: stable@vger.kernel.org # v5.15 Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20211111085238.942492-1-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/opal_proto.h')
0 files changed, 0 insertions, 0 deletions