syzbot


KCSAN: data-race in atime_needs_update / inode_set_ctime_to_ts (3)

Status: moderation: reported on 2025/12/29 14:35
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+e55f5a246004ff41d932@syzkaller.appspotmail.com
First crash: 15d, last: 15d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in atime_needs_update / inode_set_ctime_to_ts (2) fs 6 1 88d 88d 0/29 auto-obsoleted due to no activity on 2025/12/12 17:52
upstream KCSAN: data-race in atime_needs_update / inode_set_ctime_to_ts fs 6 1 220d 220d 0/29 auto-obsoleted due to no activity on 2025/08/02 17:48

Sample crash report:
==================================================================
BUG: KCSAN: data-race in atime_needs_update / inode_set_ctime_to_ts

write to 0xffff88811b0f7b18 of 4 bytes by task 7903 on cpu 0:
 inode_set_ctime_to_ts+0x84/0x170 fs/inode.c:2745
 inode_set_ctime_current+0x1cd/0x760 fs/inode.c:2808
 inode_update_timestamps+0x84/0x270 fs/inode.c:2109
 generic_update_time fs/inode.c:2148 [inline]
 inode_update_time fs/inode.c:2168 [inline]
 file_update_time_flags+0x26c/0x310 fs/inode.c:2395
 file_update_time+0x17/0x20 fs/inode.c:2416
 blkdev_write_iter+0x32e/0x4b0 block/fops.c:786
 iter_file_splice_write+0x66b/0xa20 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+0x2db1/0x3000 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811b0f7b18 of 4 bytes by task 3305 on cpu 1:
 inode_get_ctime_nsec include/linux/fs.h:1688 [inline]
 inode_get_ctime include/linux/fs.h:1694 [inline]
 relatime_need_update fs/inode.c:2068 [inline]
 atime_needs_update+0x333/0x3e0 fs/inode.c:2208
 touch_atime+0x4a/0x340 fs/inode.c:2223
 file_accessed include/linux/fs.h:2254 [inline]
 filemap_read+0x960/0xa00 mm/filemap.c:2872
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:856
 new_sync_read fs/read_write.c:491 [inline]
 vfs_read+0x64c/0x770 fs/read_write.c:572
 ksys_read+0xda/0x1a0 fs/read_write.c:715
 __do_sys_read fs/read_write.c:724 [inline]
 __se_sys_read fs/read_write.c:722 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:722
 x64_sys_call+0x2889/0x3000 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x35ad61f6 -> 0x370cb5e8

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3305 Comm: udevd Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/29 14:34 upstream 7839932417dd d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in atime_needs_update / inode_set_ctime_to_ts
* Struck through repros no longer work on HEAD.