Re: [PATCH] tracing: Move histogram trigger variables from stack to per CPU structure
From: Steven Rostedt
Date: Fri Apr 04 2025 - 10:03:08 EST
On Fri, 4 Apr 2025 09:58:41 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> Hmm, this is incorrect. hist_pads can be NULL or allocated, so the check
> should be:
>
> if (!hist_pads)
> goto fail;
> hist_pad = per_cpu_ptr(hist_pads, smp_processor_id());
>
> Will send v2.
In fact, if hist_pads fails to allocate, the triggers should not be enabled
(it would fail to enable). So I'll just add to the start of the function:
if (WARN_ON_ONCE(!hist_pads))
return NULL;
-- Steve