Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracepoint: Fix race between tracing and removing tracepoint
When executing a tracepoint, the tracepoint's func is dereferenced twice - in __DO_TRACE() (where the returned pointer is checked) and later on in __traceiter_##_name where the returned pointer is dereferenced without checking which leads to races against tracepoint_removal_sync() and crashes. This adds a check before referencing the pointer in tracepoint_ptr_deref. Link: https://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: d25e37d ("tracepoint: Optimize using static_call()") Acked-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
- Loading branch information