syzbot


KCSAN: data-race in atime_needs_update / setattr_copy (2)

Status: moderation: reported on 2025/07/26 20:52
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+bbff4dedf5f00d328df8@syzkaller.appspotmail.com
First crash: 23h47m, last: 23h47m
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in atime_needs_update / setattr_copy fs 6 1 1465d 1465d 0/29 auto-closed as invalid on 2021/09/02 23:26

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

write to 0xffff88810510a0ec of 4 bytes by task 3505 on cpu 1:
 inode_set_mtime_to_ts include/linux/fs.h:1718 [inline]
 setattr_copy+0x2d3/0x4b0 fs/attr.c:361
 shmem_setattr+0x566/0x840 mm/shmem.c:1343
 notify_change+0x809/0x890 fs/attr.c:552
 vfs_utimes+0x2fc/0x410 fs/utimes.c:66
 do_utimes_path fs/utimes.c:99 [inline]
 do_utimes+0x154/0x210 fs/utimes.c:140
 __do_sys_utimensat fs/utimes.c:159 [inline]
 __se_sys_utimensat fs/utimes.c:143 [inline]
 __x64_sys_utimensat+0xc4/0x170 fs/utimes.c:143
 x64_sys_call+0x1a2c/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:281
 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 0xffff88810510a0ec of 4 bytes by task 5318 on cpu 0:
 inode_get_mtime_nsec include/linux/fs.h:1704 [inline]
 inode_get_mtime include/linux/fs.h:1710 [inline]
 relatime_need_update fs/inode.c:1971 [inline]
 atime_needs_update+0x2a8/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: 0x15a28633 -> 0x1886b752

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5318 Comm: udevd Not tainted 6.16.0-rc7-syzkaller-00127-g302f88ff3584 #0 PREEMPT(voluntary) 
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/07/26 20:52 upstream 302f88ff3584 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in atime_needs_update / setattr_copy
* Struck through repros no longer work on HEAD.