KCSAN: data-race in xas_find_marked / xas_init_marks (8)

Status: moderation: reported on 2026/09/12 20:25
Subsystems: ext4
Labels: race:benign
[Documentation on labels]
Reported-by: syzbot+16f97d0a129419897e44@syzkaller.appspotmail.com
First crash: 2h09m, last: 2h09m
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
65e8c3e3 assessment-kcsan Benign: ✅ KCSAN: data-race in xas_find_marked / xas_init_marks (8) 2026/09/12 20:25 2026/09/12 20:25 2026/09/12 21:35 70a60e12
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_find_marked / xas_init_marks (6) ext4 mm prio:high 6 19 148d 372d 0/29 auto-obsoleted due to no activity on 2026/06/12 21:01
upstream KCSAN: data-race in xas_find_marked / xas_init_marks (3) ext4 6 1 750d 750d 0/29 auto-obsoleted due to no activity on 2024/09/27 13:38
upstream KCSAN: data-race in xas_find_marked / xas_init_marks (2) ext4 6 820 782d 1929d 0/29 auto-obsoleted due to no activity on 2024/08/19 12:59
upstream KCSAN: data-race in xas_find_marked / xas_init_marks (7) race:benign prio:low ext4 mm 6 2 71d 82d 0/29 auto-obsoleted due to no activity on 2026/08/28 21:13
upstream KCSAN: data-race in xas_find_marked / xas_init_marks (5) mm 6 7 435d 541d 0/29 auto-obsoleted due to no activity on 2025/08/29 12:06
upstream KCSAN: data-race in xas_find_marked / xas_init_marks (4) ext4 exfat 6 5 673d 698d 0/29 auto-obsoleted due to no activity on 2025/01/03 11:34
upstream KCSAN: data-race in xas_find_marked / xas_init_marks ext4 6 11 2151d 2242d 0/29 auto-closed as invalid on 2020/11/26 04:55

Sample crash report:
==================================================================
BUG: KCSAN: data-race in xas_find_marked / xas_init_marks

read-write to 0xffff88811a922b48 of 8 bytes by task 4607 on cpu 1:
 instrument_read_write include/linux/instrumented.h:56 [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+0x243/0xce0 lib/xarray.c:817
 page_cache_delete_batch mm/filemap.c:314 [inline]
 delete_from_page_cache_batch+0x324/0x720 mm/filemap.c:336
 truncate_inode_pages_range+0x1f3/0x7d0 mm/truncate.c:405
 truncate_inode_pages mm/truncate.c:485 [inline]
 truncate_pagecache+0x53/0x70 mm/truncate.c:798
 ext4_setattr+0xb71/0x1170 fs/ext4/inode.c:6214
 notify_change+0x842/0x8c0 fs/attr.c:556
 do_truncate+0x14f/0x190 fs/open.c:68
 handle_truncate fs/namei.c:4300 [inline]
 do_open fs/namei.c:4841 [inline]
 path_openat+0xd21/0x10d0 fs/namei.c:5000
 do_file_open+0x16c/0x290 fs/namei.c:5029
 do_sys_openat2+0xa0/0x130 fs/open.c:1417
 do_sys_open fs/open.c:1423 [inline]
 __do_sys_openat fs/open.c:1439 [inline]
 __se_sys_openat fs/open.c:1434 [inline]
 __x64_sys_openat+0xf2/0x120 fs/open.c:1434
 x64_sys_call+0x1f72/0x2550 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811a922b48 of 8 bytes by task 4600 on cpu 0:
 xas_find_chunk include/linux/xarray.h:1752 [inline]
 xas_find_marked+0x211/0x650 lib/xarray.c:1513
 find_get_entry mm/filemap.c:2087 [inline]
 filemap_get_folios_tag+0xf7/0x400 mm/filemap.c:2353
 mpage_prepare_extent_to_map+0x32a/0xca0 fs/ext4/inode.c:2634
 ext4_do_writepages+0x70f/0x2870 fs/ext4/inode.c:2884
 ext4_writepages+0x191/0x300 fs/ext4/inode.c:3032
 do_writepages+0x1b9/0x300 mm/page-writeback.c:2560
 filemap_writeback mm/filemap.c:387 [inline]
 filemap_flush_range mm/filemap.c:436 [inline]
 filemap_flush+0xee/0x130 mm/filemap.c:451
 ext4_alloc_da_blocks+0x54/0x100 fs/ext4/inode.c:3343
 ext4_release_file+0x5f/0x1c0 fs/ext4/file.c:171
 __fput+0x29e/0x630 fs/file_table.c:512
 ____fput+0x1c/0x30 fs/file_table.c:540
 task_work_run+0x130/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
 exit_to_user_mode_loop+0x1e4/0x8c0 kernel/entry/common.c:101
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline]
 do_syscall_64+0x212/0x360 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xfffffffffffffff8 -> 0xfffffffffffff000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4600 Comm: syz.0.305 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/12 20:25 upstream 5225b8eec4c9 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
* Struck through repros no longer work on HEAD.