================================================================== BUG: KCSAN: data-race in xas_find_marked / xas_init_marks write to 0xffff888106669d68 of 8 bytes by task 26659 on cpu 1: instrument_write include/linux/instrumented.h:42 [inline] __instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:79 [inline] __test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:109 [inline] node_clear_mark lib/xarray.c:100 [inline] xas_clear_mark lib/xarray.c:911 [inline] xas_init_marks+0x1b0/0x340 lib/xarray.c:944 xas_store+0x213/0xca0 lib/xarray.c:806 page_cache_delete_batch mm/filemap.c:328 [inline] delete_from_page_cache_batch+0x375/0x690 mm/filemap.c:349 truncate_inode_pages_range+0x1a5/0xa80 mm/truncate.c:329 truncate_inode_pages mm/truncate.c:427 [inline] truncate_pagecache+0x4f/0x70 mm/truncate.c:741 ext4_setattr+0xa21/0xec0 fs/ext4/inode.c:5498 notify_change+0x8a3/0xa80 fs/attr.c:398 do_truncate+0xe8/0x130 fs/open.c:64 handle_truncate fs/namei.c:3017 [inline] do_open fs/namei.c:3365 [inline] path_openat+0x1a79/0x20b0 fs/namei.c:3494 do_filp_open+0xd9/0x1f0 fs/namei.c:3521 do_sys_openat2+0xa3/0x250 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_creat fs/open.c:1277 [inline] __se_sys_creat fs/open.c:1271 [inline] __x64_sys_creat+0x62/0x80 fs/open.c:1271 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff888106669d68 of 8 bytes by task 8 on cpu 0: xas_find_chunk include/linux/xarray.h:1662 [inline] xas_find_marked+0x195/0x5f0 lib/xarray.c:1349 find_get_entry mm/filemap.c:1925 [inline] find_get_pages_range_tag+0xf2/0x390 mm/filemap.c:2216 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1123 mpage_prepare_extent_to_map+0x195/0x640 fs/ext4/inode.c:2577 ext4_writepages+0x9d8/0x1d10 fs/ext4/inode.c:2798 do_writepages+0x7b/0x150 mm/page-writeback.c:2352 __writeback_single_inode+0x80/0x450 fs/fs-writeback.c:1467 writeback_sb_inodes+0x564/0xf10 fs/fs-writeback.c:1732 __writeback_inodes_wb fs/fs-writeback.c:1801 [inline] wb_writeback+0x327/0x700 fs/fs-writeback.c:1907 wb_check_start_all fs/fs-writeback.c:2031 [inline] wb_do_writeback+0x330/0x510 fs/fs-writeback.c:2057 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2091 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276 worker_thread+0x636/0xae0 kernel/workqueue.c:2422 kthread+0x1d0/0x1f0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 8 Comm: kworker/u4:0 Tainted: G W 5.13.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) ================================================================== sd 0:0:1:0: [sda] Synchronizing SCSI cache sd 0:0:1:0: [sda] Synchronizing SCSI cache