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: 20d, last: 16d
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 1227d 1227d 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 1285d 1331d 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 1385d 1408d 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 329d 308d 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 1580d 1580d 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 524d 524d 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 1546d 1546d 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 1816d 1818d 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 0xffff888106a62138 of 4 bytes by task 4321 on cpu 0:
 __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 0xffff888106a62138 of 4 bytes by task 4315 on cpu 1:
 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: 1 UID: 0 PID: 4315 Comm: syz.4.269 Not tainted 6.11.0-syzkaller-11993-g3efc57369a0c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/29 13:13 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / vfs_fsync_range
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.