================================================================== BUG: KCSAN: data-race in xas_find_marked / xas_init_marks read-write to 0xffff8881196026c8 of 8 bytes by task 24716 on cpu 1: instrument_read_write include/linux/instrumented.h:55 [inline] __instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:84 [inline] ___test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:114 [inline] node_clear_mark lib/xarray.c:102 [inline] xas_clear_mark lib/xarray.c:922 [inline] xas_init_marks+0x18a/0x320 lib/xarray.c:955 xas_store+0x3cf/0xce0 lib/xarray.c:817 page_cache_delete_batch mm/filemap.c:310 [inline] delete_from_page_cache_batch+0x30a/0x6f0 mm/filemap.c:332 truncate_inode_pages_range+0x1b8/0x690 mm/truncate.c:380 truncate_inode_pages mm/truncate.c:460 [inline] truncate_pagecache+0x53/0x70 mm/truncate.c:769 ext4_setattr+0xa2e/0xfd0 fs/ext4/inode.c:5953 notify_change+0x809/0x890 fs/attr.c:552 do_truncate fs/open.c:68 [inline] do_ftruncate+0x34b/0x450 fs/open.c:195 do_sys_ftruncate fs/open.c:210 [inline] __do_sys_ftruncate fs/open.c:215 [inline] __se_sys_ftruncate fs/open.c:213 [inline] __x64_sys_ftruncate+0x68/0xc0 fs/open.c:213 x64_sys_call+0xd65/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:78 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff8881196026c8 of 8 bytes by task 24708 on cpu 0: xas_find_chunk include/linux/xarray.h:1752 [inline] xas_find_marked+0x218/0x620 lib/xarray.c:1510 find_get_entry+0x5d/0x380 mm/filemap.c:2038 filemap_get_folios_tag+0x13b/0x210 mm/filemap.c:2306 mpage_prepare_extent_to_map+0x320/0xaa0 fs/ext4/inode.c:2577 ext4_do_writepages+0x6ea/0x21c0 fs/ext4/inode.c:2816 ext4_writepages+0x176/0x300 fs/ext4/inode.c:2953 do_writepages+0x1c6/0x310 mm/page-writeback.c:2636 filemap_fdatawrite_wbc mm/filemap.c:386 [inline] __filemap_fdatawrite_range mm/filemap.c:419 [inline] file_write_and_wait_range+0x156/0x2c0 mm/filemap.c:794 generic_buffers_fsync_noflush+0x45/0x120 fs/buffer.c:609 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline] ext4_sync_file+0x1ab/0x690 fs/ext4/fsync.c:147 vfs_fsync_range+0x10a/0x130 fs/sync.c:187 generic_write_sync include/linux/fs.h:3031 [inline] ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305 ext4_file_write_iter+0x383/0xf00 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x4a0/0x8e0 fs/read_write.c:686 ksys_write+0xda/0x1a0 fs/read_write.c:738 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __x64_sys_write+0x40/0x50 fs/read_write.c:746 x64_sys_call+0x2cdd/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0xffffffffffffffff -> 0xffffffffffffff80 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 24708 Comm: syz.9.9033 Not tainted 6.16.0-rc4-syzkaller-00123-g4c06e63b9203 #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 ==================================================================