Gabriele Monaco <[email protected]> writes:
> Tracepoint handlers are now fully preemptible.
Would be nice to mention the commit that did this:
a46023d5616e ("tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with
SRCU-fast")
> When a per-CPU monitor
> handles an event, it retrieves the monitor state using a per-CPU
> pointer. If the event itself doesn't disable preemption, the task can
> migrate to a different CPU and we risk updating the wrong monitor.
>
> Mitigate this by explicitly disabling task migration before acquiring
> the monitor pointer. This cannot guarantee the monitor runs on the
> correct CPU but reduces the race condition window and prevents warnings.
>
> Reviewed-by: Wen Yang <[email protected]>
> Signed-off-by: Gabriele Monaco <[email protected]>
Reviewed-by: Nam Cao <[email protected]>