syzbot


KCSAN: data-race in vfs_fsync_range / writeback_single_inode (7)

Status: moderation: reported on 2024/05/19 01:02
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+4c44219108ba2e8e8f19@syzkaller.appspotmail.com
First crash: 27d, last: 3d03h
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in vfs_fsync_range / writeback_single_inode (4) exfat 101 411d 676d 0/27 auto-obsoleted due to no activity on 2023/06/05 02:12
upstream KCSAN: data-race in vfs_fsync_range / writeback_single_inode (3) exfat 12 736d 848d 0/27 auto-closed as invalid on 2022/07/14 22:12
upstream KCSAN: data-race in vfs_fsync_range / writeback_single_inode (5) exfat 3 343d 362d 0/27 auto-obsoleted due to no activity on 2023/08/12 00:00
upstream KCSAN: data-race in vfs_fsync_range / writeback_single_inode (6) exfat 13 116d 188d 0/27 auto-obsoleted due to no activity on 2024/03/25 18:33
upstream KCSAN: data-race in vfs_fsync_range / writeback_single_inode exfat 12 1466d 1693d 0/27 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in vfs_fsync_range / writeback_single_inode (2) exfat 131 922d 1285d 0/27 auto-closed as invalid on 2022/01/09 20:31

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

write to 0xffff888115fad360 of 8 bytes by task 12131 on cpu 0:
 writeback_single_inode+0x10e/0x4a0 fs/fs-writeback.c:1769
 sync_inode_metadata+0x5c/0x90 fs/fs-writeback.c:2842
 __generic_file_fsync+0xf9/0x140 fs/libfs.c:1527
 fat_file_fsync+0x4c/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2794 [inline]
 generic_file_write_iter+0x191/0x1d0 mm/filemap.c:4140
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3ab/0x960 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 x64_sys_call+0x2c9f/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888115fad360 of 8 bytes by task 12133 on cpu 1:
 vfs_fsync_range+0xa6/0x140 fs/sync.c:186
 generic_write_sync include/linux/fs.h:2794 [inline]
 generic_file_write_iter+0x191/0x1d0 mm/filemap.c:4140
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3ab/0x960 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 x64_sys_call+0x2c9f/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000007 -> 0x0000000000000084

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12133 Comm: syz-executor.2 Not tainted 6.10.0-rc3-syzkaller-00021-g2ef5971ff345 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/12 01:59 upstream 2ef5971ff345 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
2024/05/21 01:06 upstream daa121128a2d c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
2024/05/20 08:00 upstream eb6a9339efeb c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
2024/05/19 07:00 upstream 0450d2083be6 c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
2024/05/19 01:23 upstream 4b377b4868ef c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
2024/05/19 01:01 upstream 4b377b4868ef c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
2024/05/19 01:01 upstream 4b377b4868ef c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in vfs_fsync_range / writeback_single_inode
* Struck through repros no longer work on HEAD.