loop0: detected capacity change from 0 to 15544 ================================================================== BUG: KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range read-write to 0xffff8881006e4bf8 of 8 bytes by task 3501 on cpu 1: page_cache_delete mm/filemap.c:147 [inline] __filemap_remove_folio+0x224/0x320 mm/filemap.c:225 __remove_mapping+0x35b/0x480 mm/vmscan.c:1467 remove_mapping+0x23/0xa0 mm/vmscan.c:1500 mapping_evict_folio mm/truncate.c:282 [inline] invalidate_mapping_pagevec+0x2a9/0x3f0 mm/truncate.c:522 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:560 invalidate_bdev+0x6b/0x80 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:1587 blkdev_ioctl+0x38e/0x480 block/ioctl.c:615 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:856 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 0xffff8881006e4bf8 of 8 bytes by task 3505 on cpu 0: mapping_needs_writeback mm/filemap.c:628 [inline] file_write_and_wait_range+0x6a/0x190 mm/filemap.c:780 blkdev_fsync+0x39/0x80 block/fops.c:457 vfs_fsync_range+0x10b/0x120 fs/sync.c:188 generic_write_sync include/linux/fs.h:2469 [inline] blkdev_write_iter+0x36d/0x3d0 block/fops.c:551 do_iter_write+0x4ae/0x770 fs/read_write.c:860 vfs_iter_write+0x50/0x70 fs/read_write.c:901 iter_file_splice_write+0x456/0x7d0 fs/splice.c:795 do_splice_from fs/splice.c:873 [inline] direct_splice_actor+0x84/0xa0 fs/splice.c:1039 splice_direct_to_actor+0x2ee/0x5f0 fs/splice.c:994 do_splice_direct+0x104/0x180 fs/splice.c:1082 do_sendfile+0x3b8/0x950 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: 0x0000000000000104 -> 0x00000000000000fb Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 3505 Comm: syz-executor.3 Not tainted 6.4.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 ================================================================== syz-executor.3 (3505) used greatest stack depth: 11320 bytes left