syzbot


KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (9)

Status: moderation: reported on 2024/09/25 05:01
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+4b274ad74fbe773d3f96@syzkaller.appspotmail.com
First crash: 3d10h, last: 3d10h
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (6) exfat 1 1210d 1210d 0/28 auto-closed as invalid on 2021/07/10 17:50
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (5) ext4 5 1268d 1314d 0/28 auto-closed as invalid on 2021/05/14 12:10
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (4) ext4 6 1368d 1391d 0/28 auto-closed as invalid on 2021/02/02 16:23
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (8) exfat 1 312d 291d 0/28 auto-obsoleted due to no activity on 2023/12/26 00:02
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (2) ext4 1 1563d 1563d 0/28 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (7) ext4 1 508d 508d 0/28 auto-obsoleted due to no activity on 2023/06/13 15:21
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range (3) ext4 1 1529d 1529d 0/28 auto-closed as invalid on 2020/08/25 18:47
upstream KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range ext4 2 1800d 1801d 0/28 closed as invalid on 2019/11/19 13:44

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

write to 0xffff888106620638 of 4 bytes by task 3483 on cpu 1:
 __mark_inode_dirty+0x110/0x7e0 fs/fs-writeback.c:2478
 generic_update_time fs/inode.c:2041 [inline]
 inode_update_time fs/inode.c:2054 [inline]
 __file_update_time fs/inode.c:2243 [inline]
 file_modified_flags+0x2fd/0x330 fs/inode.c:2314
 file_modified+0x17/0x20 fs/inode.c:2330
 ext4_write_checks fs/ext4/file.c:279 [inline]
 ext4_buffered_write_iter+0x1cc/0x370 fs/ext4/file.c:295
 ext4_file_write_iter+0x293/0xe10
 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x302/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+0x39b/0x970 fs/read_write.c:1388
 __do_sys_sendfile64 fs/read_write.c:1455 [inline]
 __se_sys_sendfile64 fs/read_write.c:1441 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1441
 x64_sys_call+0xed5/0x2d60 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 0xffff888106620638 of 4 bytes by task 3488 on cpu 0:
 vfs_fsync_range+0x9a/0x130 fs/sync.c:186
 generic_write_sync include/linux/fs.h:2871 [inline]
 ext4_buffered_write_iter+0x326/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x293/0xe10
 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x302/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+0x39b/0x970 fs/read_write.c:1388
 __do_sys_sendfile64 fs/read_write.c:1455 [inline]
 __se_sys_sendfile64 fs/read_write.c:1441 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1441
 x64_sys_call+0xed5/0x2d60 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: 0x00000820 -> 0x00000028

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3488 Comm: syz.4.28 Not tainted 6.11.0-syzkaller-10547-g684a64bf32b6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/25 05:01 upstream 684a64bf32b6 5643e0e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range
* Struck through repros no longer work on HEAD.