# Re: \[PATCH v4 0/5\] tracing: add ref\_trace\_final\_put tracing

- From: Peter Zijlstra \<peterz@infradead.org\>
- Date: 2026-08-03 08:38:22 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/08/17356636
- Thread: https://ratatoskr.run/linux-trace-kernel/2026/08/17352492/t.md

```text
On Sat, Aug 01, 2026 at 06:59:40PM +0800, Eugene Mavick wrote:
> When debugging use-after-free(UAF) bugs, knowing when the object reaches
> 0 references and enters final release can significantly aid the
> debugging process.
> 
> There is currently no universal way to trace this information.
> 
> This patch series implements tracing of the final puts in the
> most widely used refcounting implementations,
> refcount_t(and thus kref which uses it), and percpu-ref.
> 
> The tracepoint records three fields:
> - caller: function that called the refcounting
>   function(refcount_sub_and_test, percpu_ref_put_many)
> - ip: return address of the trace wrapper macro call
> - obj: refcount object(struct percpu_ref, refcount_t)
> 
> Signed-off-by: Eugene Mavick <redacted>

I'm not sure this Changelog is convincing me. To me this just looks like
more weight / bloat without benefit.
```
