syzbot


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

Status: moderation: reported on 2024/11/28 22:25
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+19e0b8c172d4557d7acf@syzkaller.appspotmail.com
First crash: 164d, last: 12h07m
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in redirty_tail_locked / vfs_fsync_range (2) ext4 4 207d 244d 0/28 auto-obsoleted due to no activity on 2024/11/21 08:41
upstream KCSAN: data-race in redirty_tail_locked / vfs_fsync_range ext4 1 358d 358d 0/28 auto-obsoleted due to no activity on 2024/06/23 01:00

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

read-write to 0xffff88810059e0c8 of 4 bytes by task 6992 on cpu 0:
 redirty_tail_locked+0x56/0x280 fs/fs-writeback.c:1373
 writeback_single_inode+0x21e/0x3e0 fs/fs-writeback.c:1821
 sync_inode_metadata+0x5b/0x90 fs/fs-writeback.c:2883
 generic_buffers_fsync_noflush+0xd9/0x120 fs/buffer.c:621
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x1ab/0x690 fs/ext4/fsync.c:147
 vfs_fsync_range+0x10a/0x130 fs/sync.c:187
 generic_write_sync include/linux/fs.h:2976 [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+0x5ef/0x970 fs/splice.c:738
 do_splice_from fs/splice.c:935 [inline]
 direct_splice_actor+0x153/0x2a0 fs/splice.c:1158
 splice_direct_to_actor+0x30f/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

read to 0xffff88810059e0c8 of 4 bytes by task 6988 on cpu 1:
 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_file_write_iter+0x383/0xf00 fs/ext4/file.c:-1
 iter_file_splice_write+0x5ef/0x970 fs/splice.c:738
 do_splice_from fs/splice.c:935 [inline]
 direct_splice_actor+0x153/0x2a0 fs/splice.c:1158
 splice_direct_to_actor+0x30f/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: 0x0000003a -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 6988 Comm: syz.2.1007 Not tainted 6.15.0-rc5-syzkaller-00353-gcd802e7e5f1e #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/11 21:30 upstream cd802e7e5f1e 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/04/01 01:24 upstream 1e7857b28020 d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/02/20 06:57 upstream 87a132e73910 50668798 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/01/30 09:04 upstream ebbb8be421ee afe4eff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/01/30 09:02 upstream ebbb8be421ee afe4eff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/01/29 16:04 upstream 05dbaf8dd8bf 136953f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/01/29 08:14 upstream 05dbaf8dd8bf 865ef71e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2025/01/27 12:24 upstream 9c5968db9e62 d99a33ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2024/12/16 10:41 upstream 78d4f34e2115 eec85da6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
2024/11/28 22:24 upstream 7af08b57bcb9 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in redirty_tail_locked / vfs_fsync_range
* Struck through repros no longer work on HEAD.