loop7: detected capacity change from 0 to 17168
==================================================================
BUG: KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range
read-write to 0xffff8881005b3130 of 8 bytes by task 5339 on cpu 1:
page_cache_delete mm/filemap.c:147 [inline]
__filemap_remove_folio+0x23d/0x330 mm/filemap.c:225
__remove_mapping+0x341/0x460 mm/vmscan.c:1457
remove_mapping+0x22/0x90 mm/vmscan.c:1490
mapping_evict_folio mm/truncate.c:281 [inline]
mapping_try_invalidate+0x286/0x3d0 mm/truncate.c:520
invalidate_mapping_pages+0x27/0x30 mm/truncate.c:558
invalidate_bdev+0x65/0x70 block/bdev.c:87
loop_set_block_size drivers/block/loop.c:1494 [inline]
lo_simple_ioctl drivers/block/loop.c:1522 [inline]
lo_ioctl+0xd60/0x12e0 drivers/block/loop.c:1585
blkdev_ioctl+0x375/0x460 block/ioctl.c:630
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
read to 0xffff8881005b3130 of 8 bytes by task 5349 on cpu 0:
mapping_needs_writeback mm/filemap.c:628 [inline]
file_write_and_wait_range+0x67/0x190 mm/filemap.c:780
blkdev_fsync+0x4e/0xa0 block/fops.c:529
vfs_fsync_range+0x111/0x120 fs/sync.c:188
generic_write_sync+0xf2/0x120 include/linux/fs.h:2584
blkdev_write_iter+0x364/0x390 block/fops.c:688
do_iter_write+0x4b4/0x7b0 fs/read_write.c:860
vfs_iter_write+0x56/0x70 fs/read_write.c:901
iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
do_splice_from fs/splice.c:933 [inline]
direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
do_splice_direct+0x10d/0x190 fs/splice.c:1194
do_sendfile+0x3b6/0x9a0 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1322 [inline]
__se_sys_sendfile64 fs/read_write.c:1308 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
value changed: 0x000000000000016e -> 0x0000000000000164
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5349 Comm: syz-executor.0 Not tainted 6.6.0-rc5-syzkaller-00157-ge8c127b05766 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
==================================================================
I/O error, dev loop7, sector 2936 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 367, lost async page write
I/O error, dev loop7, sector 2928 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 366, lost async page write
I/O error, dev loop7, sector 2920 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 365, lost async page write
I/O error, dev loop7, sector 2912 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 364, lost async page write
Buffer I/O error on dev loop7, logical block 363, lost async page write
Buffer I/O error on dev loop7, logical block 362, lost async page write
Buffer I/O error on dev loop7, logical block 361, lost async page write
Buffer I/O error on dev loop7, logical block 360, lost async page write
Buffer I/O error on dev loop7, logical block 359, lost async page write
Buffer I/O error on dev loop7, logical block 358, lost async page write