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

2 views
Skip to first unread message

syzbot

unread,
May 29, 2025, 2:36:25 AM5/29/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 90b83efa6701 Merge tag 'bpf-next-6.16' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=105b96d4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c97eebd62683a33d
dashboard link: https://syzkaller.appspot.com/bug?extid=2cda982773f4abf97993
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
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/93a383fbc67f/disk-90b83efa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ef537c45c4b6/vmlinux-90b83efa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/871c4dd4722e/bzImage-90b83efa.xz

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

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

write to 0xffff888118b0a54c of 4 bytes by interrupt on cpu 0:
xa_mark_clear lib/xarray.c:77 [inline]
xas_clear_mark lib/xarray.c:932 [inline]
__xa_clear_mark+0x1c6/0x1e0 lib/xarray.c:2094
__folio_end_writeback+0x177/0x470 mm/page-writeback.c:3023
folio_end_writeback+0xb6/0x3a0 mm/filemap.c:1648
ext4_finish_bio+0x459/0x8c0 fs/ext4/page-io.c:144
ext4_end_bio+0x22a/0x330 fs/ext4/page-io.c:-1
bio_endio+0x377/0x410 block/bio.c:1645
blk_update_request+0x336/0x730 block/blk-mq.c:987
blk_mq_end_request+0x26/0x50 block/blk-mq.c:1149
lo_complete_rq+0x98/0x140 drivers/block/loop.c:304
blk_complete_reqs block/blk-mq.c:1224 [inline]
blk_done_softirq+0x77/0xb0 block/blk-mq.c:1229
handle_softirqs+0xb7/0x290 kernel/softirq.c:579
run_ksoftirqd+0x1c/0x30 kernel/softirq.c:968
smpboot_thread_fn+0x32b/0x530 kernel/smpboot.c:164
kthread+0x486/0x510 kernel/kthread.c:464
ret_from_fork+0xda/0x150 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff888118b0a54c of 4 bytes by task 4941 on cpu 1:
xa_marked include/linux/xarray.h:424 [inline]
mapping_tagged include/linux/fs.h:540 [inline]
filemap_fdatawrite_wbc mm/filemap.c:382 [inline]
__filemap_fdatawrite_range mm/filemap.c:419 [inline]
file_write_and_wait_range+0x10e/0x2c0 mm/filemap.c:794
generic_buffers_fsync_noflush+0x45/0x120 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:187
generic_write_sync include/linux/fs.h:3003 [inline]
ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305
ext4_file_write_iter+0x383/0xf00 fs/ext4/file.c:-1
iter_file_splice_write+0x5f2/0x970 fs/splice.c:738
do_splice_from fs/splice.c:935 [inline]
direct_splice_actor+0x156/0x2a0 fs/splice.c:1158
splice_direct_to_actor+0x312/0x680 fs/splice.c:1102
do_splice_direct_actor fs/splice.c:1201 [inline]
do_splice_direct+0xda/0x150 fs/splice.c:1227
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+0xb39/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:41
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x06000021 -> 0x0a000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4941 Comm: syz.3.506 Not tainted 6.15.0-syzkaller-07774-g90b83efa6701 #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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

syzbot

unread,
Jul 24, 2025, 2:36:22 AM7/24/25
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages