syzbot


KCSAN: data-race in atime_needs_update / inode_set_ctime_to_ts

Status: moderation: reported on 2025/06/07 17:48
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+4fb489b18accb3c616c7@syzkaller.appspotmail.com
First crash: 3d16h, last: 3d16h

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

write to 0xffff888104251b10 of 8 bytes by task 3299 on cpu 1:
 inode_set_ctime_to_ts+0x72/0x170 fs/inode.c:2667
 inode_set_ctime_current+0x1d6/0x770 fs/inode.c:2731
 shmem_xattr_handler_set+0x1ac/0x220 mm/shmem.c:4335
 __vfs_setxattr+0x2e6/0x310 fs/xattr.c:200
 __vfs_setxattr_noperm+0xe8/0x410 fs/xattr.c:234
 __vfs_setxattr_locked+0x1af/0x1d0 fs/xattr.c:295
 vfs_setxattr+0x132/0x270 fs/xattr.c:321
 do_setxattr fs/xattr.c:636 [inline]
 filename_setxattr+0x1ad/0x400 fs/xattr.c:665
 path_setxattrat+0x2c9/0x310 fs/xattr.c:713
 __do_sys_lsetxattr fs/xattr.c:754 [inline]
 __se_sys_lsetxattr fs/xattr.c:750 [inline]
 __x64_sys_lsetxattr+0x71/0x90 fs/xattr.c:750
 x64_sys_call+0x1e36/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:190
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888104251b10 of 8 bytes by task 11633 on cpu 0:
 inode_get_ctime_sec include/linux/fs.h:1741 [inline]
 inode_get_ctime include/linux/fs.h:1751 [inline]
 relatime_need_update fs/inode.c:1977 [inline]
 atime_needs_update+0x2ef/0x3e0 fs/inode.c:2117
 touch_atime+0x4a/0x340 fs/inode.c:2132
 do_readlinkat+0x134/0x320 fs/stat.c:589
 __do_sys_readlink fs/stat.c:613 [inline]
 __se_sys_readlink fs/stat.c:610 [inline]
 __x64_sys_readlink+0x47/0x60 fs/stat.c:610
 x64_sys_call+0x2cf3/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:90
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000068447b39 -> 0x0000000068447b3a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 11633 Comm: udevd Tainted: G        W           6.15.0-syzkaller-13659-g5b032cac6225 #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/07 17:47 upstream 5b032cac6225 4826c28e .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.