Re: [PATCH] uprobes: clear extra_consumers before pooling return instances
From: Reza Ghanbari
Date: Fri Nov 20 2026 - 08:06:43 EST
Hi Keenan, all,
I ran into this crash on my own and can confirm your patch fixes it, so
here is a Tested-by.
I was seeing it on an unpatched 6.18.63 (kernel.org source, built with a
Debian 13 config). With libfakechroot in /etc/ld.so.preload and a couple
of "setarch -R ls" loops running, I attach entry and return uprobes with
bpftrace to libfakechroot and to the same functions in libc, detaching
and reattaching every few seconds. The kernel oopses in handler_chain()
under krealloc() within a minute or so, which is the extra_consumers
path your patch is about. I haven't pinned down exactly which probes end
up sharing an address in this setup.
With only your patch on top of 6.18.63, the same probes ran 20
attach/detach cycles with no oops, and a fork-heavy variant ran 40 more,
also clean. 6.12.117 doesn't crash, which fits the Fixes: tag.
One more thing: Keke Ming's v2 for dup_return_instance() has a hunk that
clears extra_consumers when cons_cnt <= 1. With only your patch applied
the fork-heavy runs were clean, so I haven't seen a need for that hunk
for this crash.
I can send the reproducer and a full splat if that would help.
Tested-by: Reza Ghanbari <ghanbari.reza94@xxxxxxxxx>
Thanks,
Reza