Re: [PATCH] tracing: Make event_enable_count_probe() count atomic
From: Jaewon Jung
Date: Thu Dec 03 2026 - 19:11:56 EST
On Thu, Dec 03, 2026 at 08:33:00AM -0500, Steven Rostedt wrote:
> On Thu, 3 Dec 2026 13:58:44 +0900
> Jaewon Jung <jaewon8868@xxxxxxxxx> wrote:
>
> > Concurrent callbacks race on the plain count read and decrement. This can
> > lose updates or turn 0 into -1 (unlimited). Use atomic_long_t and cmpxchg
> > for the decrement.
>
> I'm curious, do you actually use this feature. It's been something I've
> been wanting to deprecate.
>
> -- Steve
My goal was just to fix the races KCSAN reports, not to make a case for
keeping the feature. I'll follow your lead on this.