syzbot


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

Status: moderation: reported on 2025/09/13 12:18
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+45f03546808c78194dc5@syzkaller.appspotmail.com
First crash: 2h57m, last: 2h57m
Similar bugs (8)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash fs 6 1 2051d 2051d 0/29 auto-closed as invalid on 2020/04/10 19:18
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (2) fs 6 1 1356d 1356d 0/29 auto-closed as invalid on 2022/01/31 01:45
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (6) ext4 6 1 662d 662d 0/29 auto-obsoleted due to no activity on 2023/12/25 18:18
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (3) ext4 6 3 1242d 1218d 0/29 auto-closed as invalid on 2022/05/28 02:05
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (5) fs 6 1 926d 926d 0/29 auto-obsoleted due to no activity on 2023/04/05 19:44
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (4) fs 6 1 1087d 1085d 0/29 auto-obsoleted due to no activity on 2022/10/27 12:04
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (8) fs 6 1 200d 200d 0/29 auto-obsoleted due to no activity on 2025/04/21 20:44
upstream KCSAN: data-race in __d_lookup_rcu / __d_rehash (7) fs 6 1 561d 561d 0/29 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 0xffff8881442ec9d0 of 8 bytes by task 32542 on cpu 1:
 hlist_bl_unhashed include/linux/list_bl.h:54 [inline]
 d_unhashed include/linux/dcache.h:361 [inline]
 __d_lookup_rcu+0x109/0x2a0 fs/dcache.c:2309
 lookup_fast+0xa3/0x320 fs/namei.c:1742
 lookup_fast_for_open fs/namei.c:3745 [inline]
 open_last_lookups fs/namei.c:3778 [inline]
 path_openat+0x43c/0x2170 fs/namei.c:4043
 do_filp_open+0x109/0x230 fs/namei.c:4073
 do_sys_openat2+0xa6/0x110 fs/open.c:1435
 do_sys_open fs/open.c:1450 [inline]
 __do_sys_openat fs/open.c:1466 [inline]
 __se_sys_openat fs/open.c:1461 [inline]
 __x64_sys_openat+0xf2/0x120 fs/open.c:1461
 x64_sys_call+0x2e9c/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:258
 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

write to 0xffff8881442ec9d0 of 8 bytes by task 32543 on cpu 0:
 hlist_bl_add_head_rcu include/linux/rculist_bl.h:81 [inline]
 __d_rehash+0x9e/0x1f0 fs/dcache.c:2489
 d_rehash+0x26/0x40 fs/dcache.c:2503
 shmem_whiteout mm/shmem.c:4087 [inline]
 shmem_rename2+0x1e4/0x290 mm/shmem.c:4117
 vfs_rename+0x7f3/0xa40 fs/namei.c:5129
 do_renameat2+0x557/0xa10 fs/namei.c:5278
 __do_sys_renameat2 fs/namei.c:5312 [inline]
 __se_sys_renameat2 fs/namei.c:5309 [inline]
 __x64_sys_renameat2+0x7e/0x90 fs/namei.c:5309
 x64_sys_call+0x3f9/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:317
 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

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 32543 Comm: syz.6.6055 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/13 12:17 upstream 320475fbd590 e2beed91 .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.