syzbot


KCSAN: data-race in move_expired_inodes / vfs_fsync_range (3)

Status: moderation: reported on 2025/05/16 21:12
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+1b2ee3e003fddf78864b@syzkaller.appspotmail.com
First crash: 8h16m, last: 8h16m
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in move_expired_inodes / vfs_fsync_range ext4 3 1567d 1600d 0/28 auto-closed as invalid on 2021/03/06 22:37
upstream KCSAN: data-race in move_expired_inodes / vfs_fsync_range (2) ext4 1 1194d 1194d 0/28 auto-closed as invalid on 2022/03/15 02:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in move_expired_inodes / vfs_fsync_range

read-write to 0xffff888117b24a98 of 4 bytes by task 31 on cpu 1:
 move_expired_inodes+0x17a/0x400 fs/fs-writeback.c:1457
 queue_io+0xd9/0x2c0 fs/fs-writeback.c:1509
 wb_writeback+0x226/0x5c0 fs/fs-writeback.c:2152
 wb_check_start_all fs/fs-writeback.c:2284 [inline]
 wb_do_writeback fs/fs-writeback.c:2310 [inline]
 wb_workfn+0x4c9/0x910 fs/fs-writeback.c:2343
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4ce/0x9d0 kernel/workqueue.c:3319
 worker_thread+0x582/0x770 kernel/workqueue.c:3400
 kthread+0x489/0x510 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff888117b24a98 of 4 bytes by task 31547 on cpu 0:
 vfs_fsync_range+0x9b/0x130 fs/sync.c:185
 generic_write_sync include/linux/fs.h:2976 [inline]
 ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305
 ext4_dio_write_iter fs/ext4/file.c:608 [inline]
 ext4_file_write_iter+0xdbf/0xf00 fs/ext4/file.c:716
 iter_file_splice_write+0x5ef/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/0x640 fs/read_write.c:1368
 __do_sys_sendfile64 fs/read_write.c:1429 [inline]
 __se_sys_sendfile64 fs/read_write.c:1415 [inline]
 __x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1415
 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+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000020 -> 0x00010022

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 31547 Comm: syz.2.3883 Not tainted 6.15.0-rc6-syzkaller-00208-g3c21441eeffc #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/16 21:11 upstream 3c21441eeffc cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in move_expired_inodes / vfs_fsync_range
* Struck through repros no longer work on HEAD.