syzbot


KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (8)

Status: moderation: reported on 2025/03/15 05:56
Subsystems: exfat ext4
[Documentation on labels]
Reported-by: syzbot+838e56e1d279904a0763@syzkaller.appspotmail.com
First crash: 50d, last: 37d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (3) exfat 1 1256d 1256d 0/28 auto-closed as invalid on 2021/12/29 19:13
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (6) ext4 1 224d 224d 0/28 auto-obsoleted due to no activity on 2024/10/27 07:39
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (2) ext4 1 1306d 1306d 0/28 auto-closed as invalid on 2021/11/09 15:48
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (5) ext4 1 762d 762d 0/28 auto-obsoleted due to no activity on 2023/05/07 10:14
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (4) ext4 1 1075d 1075d 0/28 auto-closed as invalid on 2022/06/28 09:48
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached (7) ext4 1 169d 169d 0/28 auto-obsoleted due to no activity on 2025/01/10 12:23
upstream KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached ext4 1 1342d 1342d 0/28 auto-closed as invalid on 2021/10/05 03:36

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

write to 0xffff888106356b28 of 4 bytes by task 5377 on cpu 0:
 inode_cgwb_move_to_attached+0x9a/0x300 fs/fs-writeback.c:309
 writeback_single_inode+0x2b5/0x3f0 fs/fs-writeback.c:1818
 sync_inode_metadata+0x60/0x90 fs/fs-writeback.c:2883
 __generic_file_fsync+0xed/0x140 fs/libfs.c:1536
 fat_file_fsync+0x46/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x116/0x130 fs/sync.c:187
 generic_write_sync include/linux/fs.h:2968 [inline]
 generic_file_write_iter+0x1cc/0x310 mm/filemap.c:4261
 iter_file_splice_write+0x5f2/0x980 fs/splice.c:738
 do_splice_from fs/splice.c:935 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1158
 splice_direct_to_actor+0x305/0x680 fs/splice.c:1102
 do_splice_direct_actor fs/splice.c:1201 [inline]
 do_splice_direct+0xd9/0x150 fs/splice.c:1227
 do_sendfile+0x40a/0x690 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+0x113/0x160 fs/read_write.c:1415
 x64_sys_call+0xfc3/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106356b28 of 4 bytes by task 5367 on cpu 1:
 __mark_inode_dirty+0x58/0x7e0 fs/fs-writeback.c:2509
 fat_update_time+0x1e8/0x200 fs/fat/misc.c:357
 inode_update_time fs/inode.c:2076 [inline]
 touch_atime+0x14f/0x350 fs/inode.c:2149
 file_accessed include/linux/fs.h:2591 [inline]
 filemap_splice_read+0x8cb/0x930 mm/filemap.c:3048
 do_splice_read fs/splice.c:979 [inline]
 splice_direct_to_actor+0x26c/0x680 fs/splice.c:1083
 do_splice_direct_actor fs/splice.c:1201 [inline]
 do_splice_direct+0xd9/0x150 fs/splice.c:1227
 do_sendfile+0x40a/0x690 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+0x113/0x160 fs/read_write.c:1415
 x64_sys_call+0xfc3/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000002 -> 0x00000008

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5367 Comm: syz.7.452 Not tainted 6.14.0-syzkaller-05877-g1a9239bb4253 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/27 16:36 upstream 1a9239bb4253 6c09fb82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached
2025/03/15 05:55 upstream a29967be967e e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / inode_cgwb_move_to_attached
* Struck through repros no longer work on HEAD.