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: 273d, last: 6d11h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in redirty_tail_locked / vfs_fsync_range (2) ext4 6 4 315d 353d 0/29 auto-obsoleted due to no activity on 2024/11/21 08:41
upstream KCSAN: data-race in redirty_tail_locked / vfs_fsync_range ext4 6 1 467d 467d 0/29 auto-obsoleted due to no activity on 2024/06/23 01:00

Sample crash report:
loop5: detected capacity change from 0 to 1024
EXT4-fs: Ignoring removed orlov option
==================================================================
BUG: KCSAN: data-race in redirty_tail_locked / vfs_fsync_range

read-write to 0xffff888119c8a460 of 4 bytes by task 6352 on cpu 1:
 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:2884
 generic_buffers_fsync_noflush+0xd9/0x120 fs/buffer.c:619
 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:3042 [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+0x666/0xa60 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+0x2bb0/0x2ff0 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

read to 0xffff888119c8a460 of 4 bytes by task 6340 on cpu 0:
 vfs_fsync_range+0x9b/0x130 fs/sync.c:185
 generic_write_sync include/linux/fs.h:3042 [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+0x666/0xa60 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+0x2bb0/0x2ff0 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: 0x0000003a -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 6340 Comm: syz.5.1026 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (27):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/22 17:51 upstream cf6fc5eefc5b bf27483f .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/08/20 07:05 upstream b19a97d57c15 79512909 .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/08/19 22:04 upstream b19a97d57c15 254a27c1 .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/08/15 07:42 upstream 24ea63ea3877 1804e95e .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/08/03 05:06 upstream 186f3edfdd41 7368264b .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/07/30 12:28 upstream 4b290aae788e f8f2b4da .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/07/26 10:41 upstream 5f33ebd2018c fb8f743d .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/07/23 12:04 upstream 89be9a83ccf1 e1dd4f22 .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/07/17 17:53 upstream e2291551827f 0d1223f1 .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/07/12 11:00 upstream 379f604cc3dc 3cda49cf .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/07/03 17:57 upstream 17bbde2e1716 115ceea7 .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/06/20 01:25 upstream 24770983ccfe ed3e87f7 .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/06/10 13:29 upstream f09079bd04a9 4826c28e .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/06/04 09:44 upstream 5abc7438f1e9 a30356b7 .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/05/20 15:02 upstream a5806cd506af b47f9e02 .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/05/19 13:22 upstream a5806cd506af b84f0537 .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/05/13 13:06 upstream e9565e23cd89 f6671af7 .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/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.