Home
last modified time | relevance | path

Searched hist:"35 e4c6c1a2fc2eb11b9306e95cda1fa06a511948" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/block/
H A Dioctl.cdiff 35e4c6c1a2fc2eb11b9306e95cda1fa06a511948 Tue Nov 09 04:47:23 CST 2021 Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> block: Hold invalidate_lock in BLKZEROOUT ioctl

When BLKZEROOUT ioctl and data read race, the data read leaves stale
page cache. To avoid the stale page cache, hold invalidate_lock of the
block device file mapping. The stale page cache is observed when
blktests test case block/009 is modified to call "blkdiscard -z" command
and repeated hundreds of times.

This patch can be applied back to the stable kernel version v5.15.y.
Rework is required for older stable kernels.

Fixes: 22dd6d356628 ("block: invalidate the page cache when issuing BLKZEROOUT")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: stable@vger.kernel.org # v5.15
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211109104723.835533-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>