syzbot


KCSAN: data-race in __d_lookup_rcu / __d_rehash (8)

Status: moderation: reported on 2025/02/24 20:44
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+7bc7bce232272a1d0290@syzkaller.appspotmail.com
First crash: 3d01h, last: 3d01h
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash fs 1 1854d 1854d 0/28 auto-closed as invalid on 2020/04/10 19:18
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (2) fs 1 1158d 1158d 0/28 auto-closed as invalid on 2022/01/31 01:45
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (6) ext4 1 465d 464d 0/28 auto-obsoleted due to no activity on 2023/12/25 18:18
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (3) ext4 3 1044d 1020d 0/28 auto-closed as invalid on 2022/05/28 02:05
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (5) fs 1 729d 729d 0/28 auto-obsoleted due to no activity on 2023/04/05 19:44
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (4) fs 1 889d 888d 0/28 auto-obsoleted due to no activity on 2022/10/27 12:04
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (7) fs 1 363d 363d 0/28 auto-obsoleted due to no activity on 2024/04/05 04:37

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

read to 0xffff88810625f190 of 8 bytes by task 6549 on cpu 1:
 hlist_bl_unhashed include/linux/list_bl.h:54 [inline]
 d_unhashed include/linux/dcache.h:366 [inline]
 __d_lookup_rcu+0x105/0x2a0 fs/dcache.c:2267
 lookup_fast+0x99/0x320 fs/namei.c:1727
 walk_component fs/namei.c:2110 [inline]
 link_path_walk+0x472/0x830 fs/namei.c:2479
 path_openat+0x1af/0x1fc0 fs/namei.c:3985
 do_filp_open+0x107/0x230 fs/namei.c:4016
 do_sys_openat2+0xab/0x120 fs/open.c:1428
 do_sys_open fs/open.c:1443 [inline]
 __do_sys_openat fs/open.c:1459 [inline]
 __se_sys_openat fs/open.c:1454 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1454
 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

write to 0xffff88810625f190 of 8 bytes by task 6617 on cpu 0:
 hlist_bl_add_head_rcu include/linux/rculist_bl.h:81 [inline]
 __d_rehash+0xa9/0x210 fs/dcache.c:2448
 __d_add+0x373/0x4a0 fs/dcache.c:2663
 d_add+0x45/0x50 fs/dcache.c:2686
 configfs_lookup+0x1ab/0x440 fs/configfs/dir.c:499
 lookup_one_qstr_excl+0xca/0x1c0 fs/namei.c:1693
 do_unlinkat+0x144/0x4d0 fs/namei.c:4577
 __do_sys_unlink fs/namei.c:4637 [inline]
 __se_sys_unlink fs/namei.c:4635 [inline]
 __x64_sys_unlink+0x2e/0x40 fs/namei.c:4635
 x64_sys_call+0x2329/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:88
 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 6617 Comm: syz-executor Not tainted 6.14.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/24 20:43 upstream d082ecbc71e9 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup_rcu / __d_rehash
* Struck through repros no longer work on HEAD.