diff options
author | Shin'ichiro Kawasaki <[email protected]> | 2021-11-09 19:47:22 +0900 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-11-09 12:41:12 -0700 |
commit | 7607c44c157d343223510c8ffdf7206fdd2a6213 (patch) | |
tree | 5d583e2d24b462f62bad819bd52c45f50d6d16d9 /scripts/gdb/linux | |
parent | cb690f5238d71f543f4ce874aa59237cf53a877c (diff) |
block: Hold invalidate_lock in BLKDISCARD ioctl
When BLKDISCARD 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 repeated hundreds of times.
This patch can be applied back to the stable kernel version v5.15.y
with slight patch edit. Rework is required for older stable kernels.
Fixes: 351499a172c0 ("block: Invalidate cache on discard v2")
Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Cc: [email protected] # v5.15
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions