syzbot


KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash (3)

Status: moderation: reported on 2025/02/10 04:54
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+4810d3924731e635aba1@syzkaller.appspotmail.com
First crash: 96d, last: 18d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash (2) fs 3 179d 202d 0/28 auto-obsoleted due to no activity on 2025/01/13 18:14
upstream KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash fs 1 274d 274d 0/28 auto-obsoleted due to no activity on 2024/09/19 20:54

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash

read to 0xffff8881068ff850 of 8 bytes by task 11176 on cpu 1:
 hlist_bl_unhashed include/linux/list_bl.h:54 [inline]
 d_unhashed include/linux/dcache.h:359 [inline]
 __d_lookup_rcu_op_compare+0x104/0x270 fs/dcache.c:2183
 __d_lookup_rcu+0x28e/0x2a0 fs/dcache.c:2246
 d_alloc_parallel+0x209/0xc40 fs/dcache.c:2536
 lookup_open fs/namei.c:3623 [inline]
 open_last_lookups fs/namei.c:3800 [inline]
 path_openat+0x6b5/0x2170 fs/namei.c:4036
 do_filp_open+0x109/0x230 fs/namei.c:4066
 do_sys_openat2+0xa6/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+0xf2/0x120 fs/open.c:1455
 x64_sys_call+0x1af/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff8881068ff850 of 8 bytes by task 11174 on cpu 0:
 hlist_bl_add_head_rcu include/linux/rculist_bl.h:81 [inline]
 __d_rehash+0x9e/0x1f0 fs/dcache.c:2465
 __d_add+0x364/0x4c0 fs/dcache.c:2681
 d_splice_alias+0xd6/0x280 fs/dcache.c:3025
 proc_sys_lookup+0x1f6/0x320 fs/proc/proc_sysctl.c:545
 lookup_open fs/namei.c:3679 [inline]
 open_last_lookups fs/namei.c:3800 [inline]
 path_openat+0xcf0/0x2170 fs/namei.c:4036
 do_filp_open+0x109/0x230 fs/namei.c:4066
 do_sys_openat2+0xa6/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+0xf2/0x120 fs/open.c:1455
 x64_sys_call+0x1af/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 11174 Comm: syz-executor Not tainted 6.15.0-rc4-syzkaller-00011-gf15d97df5afa #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/28 19:20 upstream f15d97df5afa aeb6ec69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash
2025/03/21 20:59 upstream d07de43e3f05 c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash
2025/03/12 16:06 upstream 0fed89a961ea ee70e6db .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash
2025/02/28 08:03 upstream 1e15510b71c9 6a8fcbc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash
2025/02/10 04:54 upstream 69b54314c975 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup_rcu_op_compare / __d_rehash
* Struck through repros no longer work on HEAD.