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

1 view
Skip to first unread message

syzbot

unread,
12:52 AM (6 hours ago) 12:52 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8f7aa3d3c732 Merge tag 'net-next-6.19' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15d6401a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3d1f9e5744fd618
dashboard link: https://syzkaller.appspot.com/bug?extid=d4ad59fd52793103b870
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.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/73d62664bf16/disk-8f7aa3d3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6ce0df27aee8/vmlinux-8f7aa3d3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0359ef461462/bzImage-8f7aa3d3.xz

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

==================================================================
BUG: KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark

write to 0xffff888106ccf254 of 4 bytes by task 13133 on cpu 1:
xa_mark_set lib/xarray.c:71 [inline]
xas_set_mark+0x12b/0x140 lib/xarray.c:900
__folio_start_writeback+0x155/0x390 mm/page-writeback.c:3038
ext4_bio_write_folio+0x5ad/0x9f0 fs/ext4/page-io.c:583
mpage_submit_folio fs/ext4/inode.c:2079 [inline]
mpage_process_page_bufs+0x4a1/0x620 fs/ext4/inode.c:2190
mpage_prepare_extent_to_map+0x781/0xbf0 fs/ext4/inode.c:2732
ext4_do_writepages+0xa05/0x2750 fs/ext4/inode.c:2925
ext4_writepages+0x176/0x300 fs/ext4/inode.c:3021
do_writepages+0x1c6/0x310 mm/page-writeback.c:2598
filemap_writeback mm/filemap.c:386 [inline]
filemap_fdatawrite_range mm/filemap.c:411 [inline]
file_write_and_wait_range+0x156/0x2c0 mm/filemap.c:785
generic_buffers_fsync_noflush+0x45/0x130 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+0x10d/0x130 fs/sync.c:188
generic_write_sync include/linux/fs.h:2617 [inline]
ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305
ext4_file_write_iter+0x387/0xf60 fs/ext4/file.c:-1
iter_file_splice_write+0x66b/0xa20 fs/splice.c:738
do_splice_from fs/splice.c:938 [inline]
direct_splice_actor+0x156/0x2a0 fs/splice.c:1161
splice_direct_to_actor+0x312/0x680 fs/splice.c:1105
do_splice_direct_actor fs/splice.c:1204 [inline]
do_splice_direct+0xda/0x150 fs/splice.c:1230
do_sendfile+0x380/0x650 fs/read_write.c:1370
__do_sys_sendfile64 fs/read_write.c:1431 [inline]
__se_sys_sendfile64 fs/read_write.c:1417 [inline]
__x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1417
x64_sys_call+0x2db1/0x3000 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106ccf254 of 4 bytes by task 13136 on cpu 0:
xa_marked include/linux/xarray.h:424 [inline]
mapping_tagged include/linux/fs.h:507 [inline]
filemap_writeback mm/filemap.c:382 [inline]
filemap_fdatawrite_range mm/filemap.c:411 [inline]
filemap_write_and_wait_range+0xfc/0x340 mm/filemap.c:683
kiocb_write_and_wait+0x7a/0x110 mm/filemap.c:2883
__iomap_dio_rw+0x551/0x1290 fs/iomap/direct-io.c:676
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:847
ext4_dio_read_iter fs/ext4/file.c:94 [inline]
ext4_file_read_iter+0x20f/0x290 fs/ext4/file.c:145
copy_splice_read+0x442/0x660 fs/splice.c:363
do_splice_read fs/splice.c:981 [inline]
splice_direct_to_actor+0x290/0x680 fs/splice.c:1086
do_splice_direct_actor fs/splice.c:1204 [inline]
do_splice_direct+0xda/0x150 fs/splice.c:1230
do_sendfile+0x380/0x650 fs/read_write.c:1370
__do_sys_sendfile64 fs/read_write.c:1431 [inline]
__se_sys_sendfile64 fs/read_write.c:1417 [inline]
__x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1417
x64_sys_call+0x2db1/0x3000 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd8/0x2a0 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: 13136 Comm: syz.6.3308 Tainted: G W syzkaller #0 PREEMPT(voluntary)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================


---
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