Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracepoint: Fix use of tracepoint funcs after rcu free
Commit de7b297 "tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints" introduces a use after free by calling release_probes on the old struct tracepoint array before the newly allocated array is published with rcu_assign_pointer. There is a race window where tracepoints (RCU readers) can perform a "use-after-grace-period-after-free", which shows up as a GPF in stress-tests. Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/p/[email protected] Reported-by: Sasha Levin <[email protected]> CC: Oleg Nesterov <[email protected]> CC: Dave Jones <[email protected]> Fixes: de7b297 "tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints" Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
- Loading branch information