syzbot


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

Status: moderation: reported on 2024/12/27 23:19
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+628613300ea4ad2bf75e@syzkaller.appspotmail.com
First crash: 235d, last: 7d05h
Similar bugs (8)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __d_lookup / __d_rehash (8) ext4 6 8 369d 486d 0/29 auto-obsoleted due to no activity on 2024/09/19 14:50
upstream KCSAN: data-race in __d_lookup / __d_rehash (6) fs 6 1 725d 725d 0/29 auto-obsoleted due to no activity on 2023/09/29 22:29
upstream KCSAN: data-race in __d_lookup / __d_rehash (4) ext4 6 1 843d 843d 0/29 auto-obsoleted due to no activity on 2023/06/04 03:50
upstream KCSAN: data-race in __d_lookup / __d_rehash fs 6 1 2104d 2104d 0/29 auto-closed as invalid on 2020/01/24 17:56
upstream KCSAN: data-race in __d_lookup / __d_rehash (3) fs 6 1 1014d 1014d 0/29 auto-obsoleted due to no activity on 2022/12/14 23:50
upstream KCSAN: data-race in __d_lookup / __d_rehash (2) fs 6 1 1208d 1208d 0/29 auto-closed as invalid on 2022/06/04 08:25
upstream KCSAN: data-race in __d_lookup / __d_rehash (5) ext4 6 2 783d 785d 0/29 auto-obsoleted due to no activity on 2023/08/02 16:55
upstream KCSAN: data-race in __d_lookup / __d_rehash (7) ext4 6 1 678d 678d 0/29 auto-obsoleted due to no activity on 2023/11/15 16:47

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

write to 0xffff8881072383d0 of 8 bytes by task 3300 on cpu 0:
 hlist_bl_add_head_rcu include/linux/rculist_bl.h:81 [inline]
 __d_rehash+0x9e/0x1f0 fs/dcache.c:2489
 __d_add+0x393/0x4f0 fs/dcache.c:2712
 d_splice_alias_ops+0xdc/0x280 fs/dcache.c:3034
 proc_sys_lookup+0x1ed/0x310 fs/proc/proc_sysctl.c:544
 lookup_open fs/namei.c:3686 [inline]
 open_last_lookups fs/namei.c:3807 [inline]
 path_openat+0xcf0/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

read to 0xffff8881072383d0 of 8 bytes by task 3302 on cpu 1:
 hlist_bl_unhashed include/linux/list_bl.h:54 [inline]
 d_unhashed include/linux/dcache.h:361 [inline]
 __d_lookup+0xf8/0x340 fs/dcache.c:2400
 lookup_fast+0x5e/0x320 fs/namei.c:1766
 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

value changed: 0xffff888237a7c690 -> 0xffff88810726b308

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3302 Comm: syz-executor Not tainted 6.17.0-rc1-syzkaller-00014-g0e39a731820a #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================
chnl_net:caif_netlink_parms(): no params data found
bridge0: port 1(bridge_slave_0) entered blocking state
bridge0: port 1(bridge_slave_0) entered disabled state
bridge_slave_0: entered allmulticast mode
bridge_slave_0: entered promiscuous mode
bridge0: port 2(bridge_slave_1) entered blocking state
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_1: entered allmulticast mode
bridge_slave_1: entered promiscuous mode
bond0: (slave bond_slave_0): Enslaving as an active interface with an up link
bond0: (slave bond_slave_1): Enslaving as an active interface with an up link
team0: Port device team_slave_0 added
team0: Port device team_slave_1 added
batman_adv: batadv0: Adding interface: batadv_slave_0
batman_adv: batadv0: The MTU of interface batadv_slave_0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Not using interface batadv_slave_0 (retrying later): interface not active
batman_adv: batadv0: Adding interface: batadv_slave_1
batman_adv: batadv0: The MTU of interface batadv_slave_1 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Not using interface batadv_slave_1 (retrying later): interface not active
hsr_slave_0: entered promiscuous mode
hsr_slave_1: entered promiscuous mode
debugfs: 'hsr0' already exists in 'hsr'
Cannot create hsr debugfs directory
netdevsim netdevsim0 netdevsim0: renamed from eth0
netdevsim netdevsim0 netdevsim1: renamed from eth1
netdevsim netdevsim0 netdevsim2: renamed from eth2
netdevsim netdevsim0 netdevsim3: renamed from eth3
8021q: adding VLAN 0 to HW filter on device bond0
8021q: adding VLAN 0 to HW filter on device team0
hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network
8021q: adding VLAN 0 to HW filter on device batadv0
veth0_vlan: entered promiscuous mode
veth1_vlan: entered promiscuous mode
veth0_macvtap: entered promiscuous mode
veth1_macvtap: entered promiscuous mode
batman_adv: batadv0: Interface activated: batadv_slave_0
batman_adv: batadv0: Interface activated: batadv_slave_1

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/13 03:26 upstream 0e39a731820a 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/08/11 05:53 upstream 8f5ae30d69d7 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/07/27 14:52 upstream ec2df4364666 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/07/18 19:00 upstream 6832a9317eee 88248e14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/06/21 18:50 upstream 3f75bfff44be d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/05/28 07:06 upstream dd3922cf9d4d 874a1386 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/05/15 21:01 upstream 088d13246a46 cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/05/12 08:17 upstream cd802e7e5f1e 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/04/26 18:51 upstream f1a3944c860b c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/03/10 02:10 upstream 1110ce6a1e34 163f510d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/02/19 20:12 upstream 6537cfb395f3 b257a9b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/01/30 23:40 upstream 72deda0abee6 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/01/30 03:04 upstream ebbb8be421ee afe4eff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/01/18 09:21 upstream 595523945be0 f2cb035c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2025/01/11 18:45 upstream 77a903cd8e5a 6dbc6a9b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
2024/12/27 23:19 upstream 8379578b11d5 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_lookup / __d_rehash
* Struck through repros no longer work on HEAD.