================================================================== BUG: KCSAN: data-race in xas_find_marked / xas_init_marks read-write to 0xffff888112e52d90 of 8 bytes by task 25059 on cpu 0: 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:914 [inline] xas_init_marks+0x17e/0x320 lib/xarray.c:947 xas_store+0x213/0xc90 lib/xarray.c:809 page_cache_delete_batch mm/filemap.c:321 [inline] delete_from_page_cache_batch+0x31d/0x710 mm/filemap.c:343 truncate_inode_pages_range+0x1c5/0x6b0 mm/truncate.c:359 truncate_inode_pages mm/truncate.c:439 [inline] truncate_pagecache+0x53/0x70 mm/truncate.c:732 ext4_setattr+0xa07/0xeb0 fs/ext4/inode.c:5448 notify_change+0x814/0x8a0 fs/attr.c:497 do_truncate+0x116/0x160 fs/open.c:65 handle_truncate fs/namei.c:3300 [inline] do_open fs/namei.c:3646 [inline] path_openat+0x1a04/0x1d80 fs/namei.c:3799 do_filp_open+0xf7/0x200 fs/namei.c:3826 do_sys_openat2+0xab/0x120 fs/open.c:1406 do_sys_open fs/open.c:1421 [inline] __do_sys_openat fs/open.c:1437 [inline] __se_sys_openat fs/open.c:1432 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1432 x64_sys_call+0x2cad/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:258 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffff888112e52d90 of 8 bytes by task 117 on cpu 1: xas_find_chunk include/linux/xarray.h:1723 [inline] xas_find_marked+0x216/0x660 lib/xarray.c:1354 find_get_entry+0x5d/0x290 mm/filemap.c:1968 filemap_get_folios_tag+0x136/0x210 mm/filemap.c:2218 mpage_prepare_extent_to_map+0x329/0xb80 fs/ext4/inode.c:2392 ext4_do_writepages+0xa20/0x2110 fs/ext4/inode.c:2677 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2768 do_writepages+0x1d8/0x480 mm/page-writeback.c:2612 __writeback_single_inode+0x91/0x870 fs/fs-writeback.c:1650 writeback_sb_inodes+0x4de/0xaa0 fs/fs-writeback.c:1941 __writeback_inodes_wb+0x9a/0x1a0 fs/fs-writeback.c:2012 wb_writeback+0x264/0x6f0 fs/fs-writeback.c:2119 wb_check_start_all fs/fs-writeback.c:2245 [inline] wb_do_writeback fs/fs-writeback.c:2271 [inline] wb_workfn+0x4ea/0x940 fs/fs-writeback.c:2304 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335 worker_thread+0x526/0x730 kernel/workqueue.c:3416 kthread+0x1d1/0x210 kernel/kthread.c:388 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 value changed: 0xfffff00000000000 -> 0xfffe000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 117 Comm: kworker/u8:4 Not tainted 6.9.0-rc4-syzkaller-00214-g13a2e429f644 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: writeback wb_workfn (flush-8:0) ================================================================== bio_check_eod: 25 callbacks suppressed kworker/u8:4: attempt to access beyond end of device loop1: rw=524288, sector=144, nr_sectors = 4 limit=0 kworker/u8:4: attempt to access beyond end of device loop1: rw=12288, sector=140, nr_sectors = 4 limit=0 EXT4-fs error (device loop1): __ext4_get_inode_loc_noinmem:4487: inode #18: block 35: comm kworker/u8:4: unable to read itable block kworker/u8:4: attempt to access beyond end of device loop1: rw=145409, sector=0, nr_sectors = 4 limit=0 buffer_io_error: 4 callbacks suppressed Buffer I/O error on dev loop1, logical block 0, lost sync page write EXT4-fs (loop1): I/O error while writing superblock netdevsim netdevsim1 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim1 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim1 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim1 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 bridge_slave_1: left allmulticast mode bridge_slave_1: left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state bridge_slave_0: left allmulticast mode bridge_slave_0: left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state bridge0 (unregistering): left allmulticast mode bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond0 (unregistering): Released all slaves hsr_slave_0: left promiscuous mode hsr_slave_1: left promiscuous mode veth1_macvtap: left promiscuous mode veth0_macvtap: left promiscuous mode veth1_vlan: left promiscuous mode veth0_vlan: left promiscuous mode pim6reg (unregistering): left allmulticast mode team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device team_slave_0 removed