[moderation] [mm?] [fs?] KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark (4)

0 views
Skip to first unread message

syzbot

unread,
Mar 12, 2026, 1:56:24 PM (15 hours ago) Mar 12
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 80234b5ab240 Merge tag 'rproc-v7.0-fixes' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=164b68ba580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6b32b22d8934c136
dashboard link: https://syzkaller.appspot.com/bug?extid=28a5986a714f06167c49
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@kvack.org wi...@infradead.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d2061817d53d/disk-80234b5a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/282391e649fb/vmlinux-80234b5a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b71dae7ba9ad/bzImage-80234b5a.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+28a598...@syzkaller.appspotmail.com

EXT4-fs (loop7): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
==================================================================
BUG: KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark

write to 0xffff888108238b4c of 4 bytes by task 31054 on cpu 1:
xa_mark_set lib/xarray.c:71 [inline]
xas_set_mark+0x12b/0x140 lib/xarray.c:900
__folio_start_writeback+0x17b/0x370 mm/page-writeback.c:2994
ext4_bio_write_folio+0x5ad/0x9f0 fs/ext4/page-io.c:584
mpage_submit_folio fs/ext4/inode.c:2080 [inline]
mpage_process_page_bufs+0x4a1/0x620 fs/ext4/inode.c:2191
mpage_prepare_extent_to_map+0x7d4/0xc50 fs/ext4/inode.c:2730
ext4_do_writepages+0xa07/0x2840 fs/ext4/inode.c:2923
ext4_writepages+0x18f/0x320 fs/ext4/inode.c:3019
do_writepages+0x1c6/0x310 mm/page-writeback.c:2554
filemap_writeback mm/filemap.c:387 [inline]
filemap_fdatawrite_range mm/filemap.c:412 [inline]
file_write_and_wait_range+0x178/0x2f0 mm/filemap.c:786
generic_buffers_fsync_noflush+0x45/0x130 fs/buffer.c:606
ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
ext4_sync_file+0x1aa/0x6b0 fs/ext4/fsync.c:147
vfs_fsync_range+0xc5/0xe0 fs/sync.c:186
generic_write_sync include/linux/fs.h:2640 [inline]
ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:306
ext4_file_write_iter+0x380/0xfa0 fs/ext4/file.c:-1
iter_file_splice_write+0x6c4/0xa80 fs/splice.c:736
do_splice_from fs/splice.c:936 [inline]
direct_splice_actor+0x156/0x2a0 fs/splice.c:1159
splice_direct_to_actor+0x311/0x670 fs/splice.c:1103
do_splice_direct_actor fs/splice.c:1202 [inline]
do_splice_direct+0x119/0x1a0 fs/splice.c:1228
do_sendfile+0x382/0x650 fs/read_write.c:1372
__do_sys_sendfile64 fs/read_write.c:1433 [inline]
__se_sys_sendfile64 fs/read_write.c:1419 [inline]
__x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1419
x64_sys_call+0x2dc4/0x3020 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888108238b4c of 4 bytes by task 31049 on cpu 0:
xa_marked include/linux/xarray.h:424 [inline]
mapping_tagged include/linux/fs.h:507 [inline]
filemap_writeback mm/filemap.c:383 [inline]
filemap_fdatawrite_range mm/filemap.c:412 [inline]
filemap_write_and_wait_range+0x11e/0x370 mm/filemap.c:684
kiocb_write_and_wait+0x7a/0x110 mm/filemap.c:2895
__iomap_dio_rw+0x5de/0x14c0 fs/iomap/direct-io.c:719
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:890
ext4_dio_read_iter fs/ext4/file.c:95 [inline]
ext4_file_read_iter+0x20f/0x290 fs/ext4/file.c:146
copy_splice_read+0x471/0x6c0 fs/splice.c:362
do_splice_read fs/splice.c:979 [inline]
splice_direct_to_actor+0x28f/0x670 fs/splice.c:1084
do_splice_direct_actor fs/splice.c:1202 [inline]
do_splice_direct+0x119/0x1a0 fs/splice.c:1228
do_sendfile+0x382/0x650 fs/read_write.c:1372
__do_sys_sendfile64 fs/read_write.c:1433 [inline]
__se_sys_sendfile64 fs/read_write.c:1419 [inline]
__x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1419
x64_sys_call+0x2dc4/0x3020 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0a000021 -> 0x04000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 31049 Comm: syz.7.5304 Tainted: G W syzkaller #0 PREEMPT(full)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages