syzbot


KCSAN: data-race in fill_mg_cmtime / shmem_mknod

Status: moderation: reported on 2024/11/20 08:18
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+9195e9356af82aebbf9f@syzkaller.appspotmail.com
First crash: 22h40m, last: 3h40m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fill_mg_cmtime / shmem_mknod

write to 0xffff8881032169a4 of 4 bytes by task 3917 on cpu 1:
 inode_set_mtime_to_ts include/linux/fs.h:1648 [inline]
 shmem_mknod+0x136/0x180 mm/shmem.c:3641
 shmem_create+0x34/0x40 mm/shmem.c:3700
 lookup_open fs/namei.c:3649 [inline]
 open_last_lookups fs/namei.c:3748 [inline]
 path_openat+0xe92/0x1fa0 fs/namei.c:3984
 do_filp_open+0x107/0x230 fs/namei.c:4014
 do_sys_openat2+0xab/0x120 fs/open.c:1398
 do_sys_open fs/open.c:1413 [inline]
 __do_sys_openat fs/open.c:1429 [inline]
 __se_sys_openat fs/open.c:1424 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1424
 x64_sys_call+0x2b30/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:258
 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 0xffff8881032169a4 of 4 bytes by task 3395 on cpu 0:
 inode_get_mtime_nsec include/linux/fs.h:1634 [inline]
 inode_get_mtime include/linux/fs.h:1640 [inline]
 fill_mg_cmtime+0x58/0x280 fs/stat.c:55
 generic_fillattr+0x241/0x330 fs/stat.c:99
 shmem_getattr+0x17b/0x200 mm/shmem.c:1174
 vfs_getattr_nosec fs/stat.c:208 [inline]
 vfs_getattr fs/stat.c:246 [inline]
 vfs_statx_path+0x171/0x2d0 fs/stat.c:283
 vfs_statx+0xe1/0x170 fs/stat.c:347
 vfs_fstatat fs/stat.c:366 [inline]
 __do_sys_newfstatat fs/stat.c:530 [inline]
 __se_sys_newfstatat+0xdc/0x300 fs/stat.c:524
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:524
 x64_sys_call+0x236d/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:263
 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: 0x3473c6d0 -> 0x349f3e86

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3395 Comm: udevd Tainted: G        W          6.12.0-syzkaller-01892-g8f7c8b88bda4 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/21 03:16 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / shmem_mknod
2024/11/20 12:25 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / shmem_mknod
2024/11/20 08:17 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / shmem_mknod
* Struck through repros no longer work on HEAD.