syzbot


KCSAN: data-race in d_alloc_parallel / d_set_d_op (12)

Status: moderation: reported on 2025/02/24 22:36
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+679899c675d13c2f2721@syzkaller.appspotmail.com
First crash: 60d, last: 7d12h
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (4) fs 1 1545d 1545d 0/28 auto-closed as invalid on 2021/03/08 01:09
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op fs 23 1842d 2005d 0/28 auto-closed as invalid on 2020/06/18 13:33
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (9) fs 29 245d 449d 0/28 auto-obsoleted due to no activity on 2024/09/27 23:53
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (7) fs 4 1038d 1094d 0/28 auto-closed as invalid on 2022/07/28 05:03
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (2) fs 1 1705d 1705d 0/28 auto-closed as invalid on 2020/09/29 03:57
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (10) fs 2 180d 203d 0/28 auto-obsoleted due to no activity on 2024/12/22 11:11
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (8) fs 43 487d 504d 0/28 auto-obsoleted due to no activity on 2024/01/30 06:40
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (6) fs 3 1131d 1177d 0/28 auto-closed as invalid on 2022/04/26 06:41
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (3) fs 2 1608d 1600d 0/28 auto-closed as invalid on 2021/01/03 18:19
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (11) fs 1 120d 120d 0/28 auto-obsoleted due to no activity on 2025/02/20 09:31
upstream KCSAN: data-race in d_alloc_parallel / d_set_d_op (5) fs 13 1414d 1503d 0/28 auto-closed as invalid on 2021/07/16 11:19

Sample crash report:
==================================================================
BUG: KCSAN: data-race in d_alloc_parallel / d_set_d_op

read-write to 0xffff888106555840 of 4 bytes by task 4264 on cpu 0:
 d_set_d_op+0xfb/0x1f0 fs/dcache.c:1848
 proc_pident_instantiate+0x164/0x180 fs/proc/base.c:2701
 proc_pident_lookup+0x11d/0x190 fs/proc/base.c:2724
 proc_tgid_base_lookup+0x2b/0x40 fs/proc/base.c:3445
 __lookup_slow+0x193/0x280 fs/namei.c:1807
 lookup_slow+0x3c/0x60 fs/namei.c:1824
 walk_component fs/namei.c:2128 [inline]
 link_path_walk+0x666/0x840 fs/namei.c:2493
 path_openat+0x1b4/0x2000 fs/namei.c:4000
 do_filp_open+0x115/0x240 fs/namei.c:4031
 do_sys_openat2+0xaa/0x110 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_openat fs/open.c:1460 [inline]
 __se_sys_openat fs/open.c:1455 [inline]
 __x64_sys_openat+0xf8/0x120 fs/open.c:1455
 x64_sys_call+0x1ac/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106555840 of 4 bytes by task 4273 on cpu 1:
 d_in_lookup include/linux/dcache.h:383 [inline]
 d_wait_lookup fs/dcache.c:2506 [inline]
 d_alloc_parallel+0x5cf/0xcb0 fs/dcache.c:2594
 __lookup_slow+0x8f/0x280 fs/namei.c:1792
 lookup_slow+0x3c/0x60 fs/namei.c:1824
 walk_component fs/namei.c:2128 [inline]
 link_path_walk+0x666/0x840 fs/namei.c:2493
 path_openat+0x1b4/0x2000 fs/namei.c:4000
 do_filp_open+0x115/0x240 fs/namei.c:4031
 do_sys_openat2+0xaa/0x110 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_openat fs/open.c:1460 [inline]
 __se_sys_openat fs/open.c:1455 [inline]
 __x64_sys_openat+0xf8/0x120 fs/open.c:1455
 x64_sys_call+0x1ac/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x01000000 -> 0x0100000c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4273 Comm: syz.6.11468 Not tainted 6.15.0-rc2-syzkaller-00278-gfc96b232f8e7 #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/04/18 19:09 upstream fc96b232f8e7 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in d_alloc_parallel / d_set_d_op
2025/02/24 22:35 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in d_alloc_parallel / d_set_d_op
* Struck through repros no longer work on HEAD.