================================================================== BUG: KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range read-write to 0xffff8881004c1e70 of 8 bytes by task 21498 on cpu 1: page_cache_delete mm/filemap.c:155 [inline] __filemap_remove_folio+0x1c5/0x2c0 mm/filemap.c:233 __remove_mapping+0x33f/0x470 mm/vmscan.c:791 remove_mapping+0x22/0x90 mm/vmscan.c:824 mapping_evict_folio mm/truncate.c:277 [inline] mapping_try_invalidate+0x266/0x3f0 mm/truncate.c:496 invalidate_mapping_pages+0x27/0x40 mm/truncate.c:538 invalidate_bdev+0x58/0x70 block/bdev.c:102 loop_set_block_size drivers/block/loop.c:1471 [inline] lo_simple_ioctl drivers/block/loop.c:1497 [inline] lo_ioctl+0xb38/0x11c0 drivers/block/loop.c:1560 blkdev_ioctl+0x359/0x450 block/ioctl.c:693 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xcd/0x140 fs/ioctl.c:893 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893 x64_sys_call+0x15cc/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881004c1e70 of 8 bytes by task 21497 on cpu 0: mapping_needs_writeback mm/filemap.c:635 [inline] file_write_and_wait_range+0x67/0x250 mm/filemap.c:787 blkdev_fsync+0x48/0xa0 block/fops.c:555 vfs_fsync_range+0x116/0x130 fs/sync.c:188 generic_write_sync+0xec/0x120 include/linux/fs.h:2871 blkdev_write_iter+0x379/0x3c0 block/fops.c:723 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x160/0x2c0 fs/splice.c:1164 splice_direct_to_actor+0x302/0x670 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0xd7/0x150 fs/splice.c:1233 do_sendfile+0x39b/0x970 fs/read_write.c:1388 __do_sys_sendfile64 fs/read_write.c:1455 [inline] __se_sys_sendfile64 fs/read_write.c:1441 [inline] __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1441 x64_sys_call+0xed5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:41 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x00000000000001b1 -> 0x00000000000001ad Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 21497 Comm: syz.1.6774 Not tainted 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 ================================================================== I/O error, dev loop7, sector 10624 op 0x1:(WRITE) flags 0x800 phys_seg 16 prio class 0 Buffer I/O error on dev loop7, logical block 1328, lost async page write Buffer I/O error on dev loop7, logical block 1329, lost async page write Buffer I/O error on dev loop7, logical block 1330, lost async page write Buffer I/O error on dev loop7, logical block 1331, lost async page write Buffer I/O error on dev loop7, logical block 1332, lost async page write Buffer I/O error on dev loop7, logical block 1333, lost async page write Buffer I/O error on dev loop7, logical block 1334, lost async page write Buffer I/O error on dev loop7, logical block 1335, lost async page write Buffer I/O error on dev loop7, logical block 1336, lost async page write Buffer I/O error on dev loop7, logical block 1337, lost async page write