syzbot


ID Workflow Result Correct Bug Created Started Finished Revision Error
d8527543-c075-4d0f-ba5a-ebce7cd8a867 repro ❓ KCSAN: data-race in __dentry_kill / shrink_dentry_list (7) 2026/03/08 01:51 2026/03/08 01:51 2026/03/08 01:58 31e9c887f7dc24e04b3ca70d0d54fc34141844b0


ReproOpts:
{
	"procs": 1,
	"repeat": true,
	"sandbox": "none",
	"threaded": true,
	"collide": false
}


ReproSyz:
r0 = fork()
if (r0 == 0) {
	r1 = clone(0x10f00, 0x0, 0x0, 0x0, 0x0)
	if (r1 == 0) {
		openat(0xffffffffffffff9c, &(0x7f0000000000)='/proc/thread-self/stat\x00', 0x0, 0x0)
		openat(0xffffffffffffff9c, &(0x7f0000000040)='/proc/thread-self/status\x00', 0x0, 0x0)
		usleep(0x30d40)
		exit(0x0)
	}
	usleep(0x4e20)
	openat(0xffffffffffffff9c, &(0x7f0000000100)='/proc/self/stat\x00', 0x0, 0x0)
	openat(0xffffffffffffff9c, &(0x7f0000000140)='/proc/self/status\x00', 0x0, 0x0)
	exit(0x0)
}
wait4(r0, 0x0, 0x0, 0x0)


SyzkallerCommit:
31e9c887f7dc24e04b3ca70d0d54fc34141844b0

Crash report:
==================================================================
BUG: KCSAN: data-race in __dentry_kill / shrink_dentry_list

read-write to 0xffff88810763ad80 of 4 bytes by task 3311 on cpu 0:
 d_shrink_del fs/dcache.c:516 [inline]
 shrink_dentry_list+0x1a6/0x3c0 fs/dcache.c:1173
 shrink_dcache_tree+0x5b/0x220 fs/dcache.c:-1
 shrink_dcache_parent fs/dcache.c:1626 [inline]
 d_invalidate+0x76/0x1d0 fs/dcache.c:1708
 proc_invalidate_siblings_dcache+0x1c8/0x2b0 fs/proc/inode.c:142
 proc_flush_pid+0x1d/0x30 fs/proc/base.c:3481
 release_task+0x988/0xb60 kernel/exit.c:291
 wait_task_zombie kernel/exit.c:1274 [inline]
 wait_consider_task+0x1160/0x1670 kernel/exit.c:1501
 do_wait_thread kernel/exit.c:1564 [inline]
 __do_wait+0xf9/0x510 kernel/exit.c:1682
 do_wait+0xb6/0x260 kernel/exit.c:1716
 kernel_wait4+0x19f/0x210 kernel/exit.c:1875
 __do_sys_wait4 kernel/exit.c:1903 [inline]
 __se_sys_wait4 kernel/exit.c:1899 [inline]
 __x64_sys_wait4+0x91/0x120 kernel/exit.c:1899
 x64_sys_call+0x2aee/0x3020 arch/x86/include/generated/asm/syscalls_64.h:62
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810763ad80 of 4 bytes by task 9987 on cpu 1:
 dentry_unlist fs/dcache.c:640 [inline]
 __dentry_kill+0x25c/0x460 fs/dcache.c:684
 finish_dput+0x2b/0x200 fs/dcache.c:879
 dput+0x52/0x60 fs/dcache.c:928
 proc_invalidate_siblings_dcache+0x1d0/0x2b0 fs/proc/inode.c:143
 proc_flush_pid+0x1d/0x30 fs/proc/base.c:3481
 release_task+0x988/0xb60 kernel/exit.c:291
 exit_notify kernel/exit.c:777 [inline]
 do_exit+0xd5c/0x15a0 kernel/exit.c:983
 do_group_exit+0xfe/0x140 kernel/exit.c:1112
 get_signal+0xe54/0xf60 kernel/signal.c:3034
 arch_do_signal_or_restart+0x96/0x450 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline]
 exit_to_user_mode_loop+0x6a/0x6f0 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
 do_syscall_64+0x249/0x370 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0024040c -> 0x0000000c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9987 Comm: syz.3.2352 Tainted: G        W           syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================

Trajectory:
Seq Timestamp Type Name Duration
0/0 2026/03/08 01:51 flow repro
7m Results:
map[ReproOpts:{
	"procs": 1,
	"repeat": true,
	"sandbox": "none",
	"threaded": true,
	"collide": false
} ReproSyz:r0 = fork()
if (r0 == 0) {
	r1 = clone(0x10f00, 0x0, 0x0, 0x0, 0x0)
	if (r1 == 0) {
		openat(0xffffffffffffff9c, &(0x7f0000000000)='/proc/thread-self/stat\x00', 0x0, 0x0)
		openat(0xffffffffffffff9c, &(0x7f0000000040)='/proc/thread-self/status\x00', 0x0, 0x0)
		usleep(0x30d40)
		exit(0x0)
	}
	usleep(0x4e20)
	openat(0xffffffffffffff9c, &(0x7f0000000100)='/proc/self/stat\x00', 0x0, 0x0)
	openat(0xffffffffffffff9c, &(0x7f0000000140)='/proc/self/status\x00', 0x0, 0x0)
	exit(0x0)
}
wait4(r0, 0x0, 0x0, 0x0)
 SyzkallerCommit:31e9c887f7dc24e04b3ca70d0d54fc34141844b0]

1/1 2026/03/08 01:51 action provide-var
0m Results:
map[DescriptionFiles:[acpi_thermal_rel.txt aio.txt auto.txt binfmt.txt bpf.txt bpf_prog.txt bpf_trace.txt cgroup.txt damon.txt dev_ashmem.txt dev_bifrost.txt dev_binder.txt dev_binderfs.txt dev_block.txt dev_bsg.txt dev_bus_usb.txt dev_camx.txt dev_cdrom.txt dev_cec.txt dev_char_usb.txt dev_comedi.txt dev_dma_heap.txt dev_dri.txt dev_dsp.txt dev_dvb_demux.txt dev_dvb_dvr.txt dev_dvb_frontend.txt dev_fb.txt dev_floppy.txt dev_hidraw.txt dev_i2c.txt dev_i915.txt dev_img_rogue.txt dev_infiniband_rdma.txt dev_infiniband_rdma_cm.txt dev_input.txt dev_iommu.txt dev_kvm.txt dev_kvm_amd64.txt dev_kvm_arm64.txt dev_kvm_extra.txt dev_kvm_riscv64.txt dev_loop.txt dev_mali.txt dev_media.txt dev_msm.txt dev_msr.txt dev_nbd.txt dev_net_tun.txt dev_panthor.txt dev_ppp.txt dev_ptmx.txt dev_ptp.txt dev_qat_adf_ctl.txt dev_qrtr_tun.txt dev_random.txt dev_rfkill.txt dev_rtc.txt dev_sequencer.txt dev_sg.txt dev_snapshot.txt dev_snd_control.txt dev_snd_hw.txt dev_snd_midi.txt dev_snd_pcm.txt dev_snd_seq.txt dev_snd_timer.txt dev_sr.txt dev_sw_sync.txt dev_tlk_device.txt dev_trusty.txt dev_udmabuf.txt dev_uhid.txt dev_uinput.txt dev_usb_hiddev.txt dev_usbmon.txt dev_userio.txt dev_vfio.txt dev_vga_arbiter.txt dev_vhci.txt dev_video4linux.txt dev_video4linux_vim2m.txt dev_virtual_nci.txt dev_vtpm.txt fanotify.txt filesystem.txt fs_9p.txt fs_fuse.txt fs_incfs.txt fs_ioctl.txt fs_ioctl_autofs.txt fs_ioctl_btrfs.txt fs_ioctl_ext4.txt fs_ioctl_f2fs.txt fs_ioctl_fat.txt fs_ioctl_fscrypt.txt fs_ioctl_fsverity.txt fs_ioctl_xfs.txt futex.txt hafnium.txt inotify.txt io_uring.txt ipc.txt key.txt kfuzztest.txt l2cap.txt landlock.txt lsm.txt namespaces.txt net_80211.txt netfilter.txt netfilter_arp.txt netfilter_bridge.txt netfilter_ipv4.txt netfilter_ipv6.txt netfilter_ipvs.txt netfilter_targets.txt pagemap_ioctl.txt perf.txt prctl.txt quotactl.txt seccomp.txt security_apparmor.txt security_selinux.txt security_smack.txt socket.txt socket_alg.txt socket_ax25.txt socket_bluetooth.txt socket_caif.txt socket_can.txt socket_ieee802154.txt socket_inet.txt socket_inet6.txt socket_inet_dccp.txt socket_inet_icmp.txt socket_inet_igmp.txt socket_inet_l2tp.txt socket_inet_sctp.txt socket_inet_tcp.txt socket_inet_udp.txt socket_ip_tunnel.txt socket_isdn.txt socket_kcm.txt socket_key.txt socket_llc.txt socket_netlink.txt socket_netlink_audit.txt socket_netlink_crypto.txt socket_netlink_generic.txt socket_netlink_generic_80211.txt socket_netlink_generic_batadv.txt socket_netlink_generic_devlink.txt socket_netlink_generic_ethtool.txt socket_netlink_generic_fou.txt socket_netlink_generic_gtp.txt socket_netlink_generic_mptcp.txt socket_netlink_generic_net_dm.txt socket_netlink_generic_netlabel.txt socket_netlink_generic_nfc.txt socket_netlink_generic_seg6.txt socket_netlink_generic_smc.txt socket_netlink_generic_team.txt socket_netlink_generic_wireguard.txt socket_netlink_netfilter.txt socket_netlink_netfilter_acct.txt socket_netlink_netfilter_conntrack.txt socket_netlink_netfilter_conntrack_exp.txt socket_netlink_netfilter_conntrack_helper.txt socket_netlink_netfilter_ipset.txt socket_netlink_netfilter_log.txt socket_netlink_netfilter_nft_compat.txt socket_netlink_netfilter_nftables.txt socket_netlink_netfilter_osf.txt socket_netlink_netfilter_queue.txt socket_netlink_netfilter_timeout.txt socket_netlink_rdma.txt socket_netlink_route.txt socket_netlink_route_sched.txt socket_netlink_route_sched_retired.txt socket_netlink_sock_diag.txt socket_netlink_xfrm.txt socket_netrom.txt socket_nfc.txt socket_nvme_of_tcp.txt socket_packet.txt socket_phonet.txt socket_pppox.txt socket_qipcrtr.txt socket_rds.txt socket_rose.txt socket_rxrpc.txt socket_tipc.txt socket_tipc_netlink.txt socket_unix.txt socket_vnet.txt socket_x25.txt socket_xdp.txt sys.txt uffd.txt usbip.txt vmw_vmci.txt vnet.txt vnet_mptcp.txt vusb.txt watch_queue.txt xattr.txt] SyzkallerCommit:31e9c887f7dc24e04b3ca70d0d54fc34141844b0]

2/1 2026/03/08 01:51 action kernel-checkouter
0m Results:
map[KernelSrc:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/src/3ea2b3c0cb884f2c4ef738badeb1c102e6abd69e]

3/1 2026/03/08 01:52 action kernel-builder
4m Results:
map[KernelObj:/usr/local/google/home/dvyukov/syzkaller/agent/workdir/cache/build/b6da4f04f97544ae79861bcb62d6d02ef46d1bed]

4/1 2026/03/08 01:56 agent crash-repro-finder
2m Model:
gemini-3-pro-preview

Results:
map[ReproOpts:{
	"procs": 1,
	"repeat": true,
	"sandbox": "none",
	"threaded": true,
	"collide": false
}]

Instruction:
You are an expert in linux kernel fuzzing. Your goal is to write a syzkaller program to trigger a specific bug.
Print only the syz program that could be executed directly, without backticks.




Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Bug Title: KCSAN: data-race in __dentry_kill / shrink_dentry_list

Original Crash Report:
==================================================================
BUG: KCSAN: data-race in __dentry_kill / shrink_dentry_list

read-write to 0xffff88810763ad80 of 4 bytes by task 3311 on cpu 0:
 d_shrink_del fs/dcache.c:516 [inline]
 shrink_dentry_list+0x1a6/0x3c0 fs/dcache.c:1173
 shrink_dcache_tree+0x5b/0x220 fs/dcache.c:-1
 shrink_dcache_parent fs/dcache.c:1626 [inline]
 d_invalidate+0x76/0x1d0 fs/dcache.c:1708
 proc_invalidate_siblings_dcache+0x1c8/0x2b0 fs/proc/inode.c:142
 proc_flush_pid+0x1d/0x30 fs/proc/base.c:3481
 release_task+0x988/0xb60 kernel/exit.c:291
 wait_task_zombie kernel/exit.c:1274 [inline]
 wait_consider_task+0x1160/0x1670 kernel/exit.c:1501
 do_wait_thread kernel/exit.c:1564 [inline]
 __do_wait+0xf9/0x510 kernel/exit.c:1682
 do_wait+0xb6/0x260 kernel/exit.c:1716
 kernel_wait4+0x19f/0x210 kernel/exit.c:1875
 __do_sys_wait4 kernel/exit.c:1903 [inline]
 __se_sys_wait4 kernel/exit.c:1899 [inline]
 __x64_sys_wait4+0x91/0x120 kernel/exit.c:1899
 x64_sys_call+0x2aee/0x3020 arch/x86/include/generated/asm/syscalls_64.h:62
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x12c/0x370 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810763ad80 of 4 bytes by task 9987 on cpu 1:
 dentry_unlist fs/dcache.c:640 [inline]
 __dentry_kill+0x25c/0x460 fs/dcache.c:684
 finish_dput+0x2b/0x200 fs/dcache.c:879
 dput+0x52/0x60 fs/dcache.c:928
 proc_invalidate_siblings_dcache+0x1d0/0x2b0 fs/proc/inode.c:143
 proc_flush_pid+0x1d/0x30 fs/proc/base.c:3481
 release_task+0x988/0xb60 kernel/exit.c:291
 exit_notify kernel/exit.c:777 [inline]
 do_exit+0xd5c/0x15a0 kernel/exit.c:983
 do_group_exit+0xfe/0x140 kernel/exit.c:1112
 get_signal+0xe54/0xf60 kernel/signal.c:3034
 arch_do_signal_or_restart+0x96/0x450 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline]
 exit_to_user_mode_loop+0x6a/0x6f0 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
 do_syscall_64+0x249/0x370 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0024040c -> 0x0000000c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9987 Comm: syz.3.2352 Tainted: G        W           syzkaller #0 PREEMPT(full) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
==================================================================


The list of existing description files:
acpi_thermal_rel.txt
aio.txt
auto.txt
binfmt.txt
bpf.txt
bpf_prog.txt
bpf_trace.txt
cgroup.txt
damon.txt
dev_ashmem.txt
dev_bifrost.txt
dev_binder.txt
dev_binderfs.txt
dev_block.txt
dev_bsg.txt
dev_bus_usb.txt
dev_camx.txt
dev_cdrom.txt
dev_cec.txt
dev_char_usb.txt
dev_comedi.txt
dev_dma_heap.txt
dev_dri.txt
dev_dsp.txt
dev_dvb_demux.txt
dev_dvb_dvr.txt
dev_dvb_frontend.txt
dev_fb.txt
dev_floppy.txt
dev_hidraw.txt
dev_i2c.txt
dev_i915.txt
dev_img_rogue.txt
dev_infiniband_rdma.txt
dev_infiniband_rdma_cm.txt
dev_input.txt
dev_iommu.txt
dev_kvm.txt
dev_kvm_amd64.txt
dev_kvm_arm64.txt
dev_kvm_extra.txt
dev_kvm_riscv64.txt
dev_loop.txt
dev_mali.txt
dev_media.txt
dev_msm.txt
dev_msr.txt
dev_nbd.txt
dev_net_tun.txt
dev_panthor.txt
dev_ppp.txt
dev_ptmx.txt
dev_ptp.txt
dev_qat_adf_ctl.txt
dev_qrtr_tun.txt
dev_random.txt
dev_rfkill.txt
dev_rtc.txt
dev_sequencer.txt
dev_sg.txt
dev_snapshot.txt
dev_snd_control.txt
dev_snd_hw.txt
dev_snd_midi.txt
dev_snd_pcm.txt
dev_snd_seq.txt
dev_snd_timer.txt
dev_sr.txt
dev_sw_sync.txt
dev_tlk_device.txt
dev_trusty.txt
dev_udmabuf.txt
dev_uhid.txt
dev_uinput.txt
dev_usb_hiddev.txt
dev_usbmon.txt
dev_userio.txt
dev_vfio.txt
dev_vga_arbiter.txt
dev_vhci.txt
dev_video4linux.txt
dev_video4linux_vim2m.txt
dev_virtual_nci.txt
dev_vtpm.txt
fanotify.txt
filesystem.txt
fs_9p.txt
fs_fuse.txt
fs_incfs.txt
fs_ioctl.txt
fs_ioctl_autofs.txt
fs_ioctl_btrfs.txt
fs_ioctl_ext4.txt
fs_ioctl_f2fs.txt
fs_ioctl_fat.txt
fs_ioctl_fscrypt.txt
fs_ioctl_fsverity.txt
fs_ioctl_xfs.txt
futex.txt
hafnium.txt
inotify.txt
io_uring.txt
ipc.txt
key.txt
kfuzztest.txt
l2cap.txt
landlock.txt
lsm.txt
namespaces.txt
net_80211.txt
netfilter.txt
netfilter_arp.txt
netfilter_bridge.txt
netfilter_ipv4.txt
netfilter_ipv6.txt
netfilter_ipvs.txt
netfilter_targets.txt
pagemap_ioctl.txt
perf.txt
prctl.txt
quotactl.txt
seccomp.txt
security_apparmor.txt
security_selinux.txt
security_smack.txt
socket.txt
socket_alg.txt
socket_ax25.txt
socket_bluetooth.txt
socket_caif.txt
socket_can.txt
socket_ieee802154.txt
socket_inet.txt
socket_inet6.txt
socket_inet_dccp.txt
socket_inet_icmp.txt
socket_inet_igmp.txt
socket_inet_l2tp.txt
socket_inet_sctp.txt
socket_inet_tcp.txt
socket_inet_udp.txt
socket_ip_tunnel.txt
socket_isdn.txt
socket_kcm.txt
socket_key.txt
socket_llc.txt
socket_netlink.txt
socket_netlink_audit.txt
socket_netlink_crypto.txt
socket_netlink_generic.txt
socket_netlink_generic_80211.txt
socket_netlink_generic_batadv.txt
socket_netlink_generic_devlink.txt
socket_netlink_generic_ethtool.txt
socket_netlink_generic_fou.txt
socket_netlink_generic_gtp.txt
socket_netlink_generic_mptcp.txt
socket_netlink_generic_net_dm.txt
socket_netlink_generic_netlabel.txt
socket_netlink_generic_nfc.txt
socket_netlink_generic_seg6.txt
socket_netlink_generic_smc.txt
socket_netlink_generic_team.txt
socket_netlink_generic_wireguard.txt
socket_netlink_netfilter.txt
socket_netlink_netfilter_acct.txt
socket_netlink_netfilter_conntrack.txt
socket_netlink_netfilter_conntrack_exp.txt
socket_netlink_netfilter_conntrack_helper.txt
socket_netlink_netfilter_ipset.txt
socket_netlink_netfilter_log.txt
socket_netlink_netfilter_nft_compat.txt
socket_netlink_netfilter_nftables.txt
socket_netlink_netfilter_osf.txt
socket_netlink_netfilter_queue.txt
socket_netlink_netfilter_timeout.txt
socket_netlink_rdma.txt
socket_netlink_route.txt
socket_netlink_route_sched.txt
socket_netlink_route_sched_retired.txt
socket_netlink_sock_diag.txt
socket_netlink_xfrm.txt
socket_netrom.txt
socket_nfc.txt
socket_nvme_of_tcp.txt
socket_packet.txt
socket_phonet.txt
socket_pppox.txt
socket_qipcrtr.txt
socket_rds.txt
socket_rose.txt
socket_rxrpc.txt
socket_tipc.txt
socket_tipc_netlink.txt
socket_unix.txt
socket_vnet.txt
socket_x25.txt
socket_xdp.txt
sys.txt
uffd.txt
usbip.txt
vmw_vmci.txt
vnet.txt
vnet_mptcp.txt
vusb.txt
watch_queue.txt
xattr.txt


Reply:
r0 = fork()
if (r0 == 0) {
	r1 = clone(0x10f00, 0x0, 0x0, 0x0, 0x0)
	if (r1 == 0) {
		openat(0xffffffffffffff9c, &(0x7f0000000000)='/proc/thread-self/stat\x00', 0x0, 0x0)
		openat(0xffffffffffffff9c, &(0x7f0000000040)='/proc/thread-self/status\x00', 0x0, 0x0)
		usleep(0x30d40)
		exit(0x0)
	}
	usleep(0x4e20)
	openat(0xffffffffffffff9c, &(0x7f0000000100)='/proc/self/stat\x00', 0x0, 0x0)
	openat(0xffffffffffffff9c, &(0x7f0000000140)='/proc/self/status\x00', 0x0, 0x0)
	exit(0x0)
}
wait4(r0, 0x0, 0x0, 0x0)

5/2 2026/03/08 01:56 llm crash-repro-finder
2m Model:
gemini-3-pro-preview

Tokens:
							input: 3173
							output: 57
							thoughts: 17439
						

Thoughts:
**Reproducing the KCSAN Data-Race in `__dentry_kill` / `shrink_dentry_list`**

Okay, so the goal is to create a syzkaller program that reliably triggers the KCSAN data-race bug between `__dentry_kill` and `shrink_dentry_list`, specifically where one task writes to a dentry while another reads from it. The crash report's stack traces point to a race during process exit and the associated cleanup of `/proc` entries, particularly around `proc_flush_pid`, `proc_invalidate_siblings_dcache`, and their relationship to `release_task` and dentry invalidation (`d_invalidate`) versus dentry putting and destruction (`dput` and `__dentry_kill`).

The bug's essence is a race between a parent task reaping a child and a child (or thread) cleaning up its resources when exiting, both calling `proc_flush_pid` which calls `proc_invalidate_siblings_dcache` and which iterates through a list of related dentries. `d_invalidate` performs cleanup on a dentry and its children (shrinking and marking for later collection), while `dput` decrements the refcount and potentially kills the dentry if the refcount drops to zero (leading to `__dentry_kill` and `dentry_unlist`). The key here is synchronizing the two `release_task` calls so the dentry is simultaneously accessed in conflicting ways. The stack traces reveal this happens when a parent waits for a child to exit, and the child calls `release_task` during the normal exit path.

So, the plan is to create a multi-threaded scenario to exploit this:

1.  A parent process forks a child and creates a thread within the child.
2.  The child (leader) and thread both access `/proc` entries – the thread populating `procfs` dentries for itself via `/proc/thread-self/*` and the parent doing the same for `/proc/self/*`, which is crucial. These accesses create dentries within the dcache, increasing the chances the race will be hit.
3.  The child exits, either by calling `exit` or having the parent trigger its exit. If the parent signals the child, group exit logic is used, so the child is forced to exit when the signal is received. This synchronizes things a bit better than the child trying to exit on its own.
4.  The parent calls `wait4` on the child process to reap the zombie.

The crucial part is the timing: we want the thread's `proc_flush_pid` calls (triggered by the exit) to overlap with the parent process’s `proc_flush_pid` calls (triggered by `wait4`). Both `proc_flush_pid` calls operate on the same dentry (or related dentries in the same subtree). This is accomplished by making the thread sleep a bit, opening several file entries for itself in `/proc` to create more work in the `proc_invalidate_siblings_dcache`, and, crucially, having the parent call exit on its process after the thread has populated its dcache entries. In the parent process, a short sleep ensures that the thread has time to do its dentry population before the group exit gets initiated. Having multiple `/proc/thread-self/` entries open increases the chances of the race by increasing the size of the dentry list.

The syzkaller program uses `fork` to create the child (leader process), `clone` with `CLONE_THREAD | CLONE_SIGHAND | CLONE_VM` to create the thread, multiple `openat` calls to populate the dentries, `usleep` calls for synchronization and finally, `exit` calls and `wait4`. The thread sleeps long enough for its dentries to get populated and then waits for the signal (group exit). The parent's wait is immediate.

Essentially, the strategy is to create a situation where the child (leader) signals the thread to exit (either explicitly or via group exit) but the parent immediately calls `wait4`. The race is now guaranteed: one call to `proc_flush_pid` to invalidate the `/proc/<pid>` dentry and shrink its children, and another (child's) call to invalidate the `/proc/<pid>/task/<tid>` dentry and clean it up (potentially causing the race condition).



6/2 2026/03/08 01:58 tool set-results
0m Args:
map[ReproOpts:{
	"procs": 1,
	"repeat": true,
	"sandbox": "none",
	"threaded": true,
	"collide": false
}]

Results:
map[ReproOpts:{
	"procs": 1,
	"repeat": true,
	"sandbox": "none",
	"threaded": true,
	"collide": false
}]

7/2 2026/03/08 01:58 llm crash-repro-finder
0m Model:
gemini-3-pro-preview

Tokens:
							input: 21664
							output: 334
							thoughts: 0
						

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)