Tracepoints fix reentrancy
PATCH 1/1 Tracepoints fix reentrancy
The tracepoints had the same problem markers did have wrt reentrancy. Apply a similar fix using a rcu_barrier after each tracepoint mutex lock.
Signed-off-by Mathieu Desnoyers <[email protected]>
CC Ingo Molnar <[email protected]>
CC "Frank Ch. Eigler" <[email protected]>
CC Lai Jiangshan <[email protected]>
--- kernel/tracepoint.c | 4 ++++ 1 file changed, 4 insertions(+)
kernel/tracepoint.c +4 -0
@@ -361,6 +361,8 @@ int tracepoint_probe_register(const charmutex_lock (&tracepoints_mutex); entry =get_tracepoint (name);WARN_ON (!entry); +if (entry->rcu_pending) +rcu_barrier_sched ();tracepoint_entry_free_old (entry, old); end:mutex_unlock (&tracepoints_mutex);
@@ -397,6 +399,8 @@ int tracepoint_probe_unregister(const ch entry =get_tracepoint (name);if (!entry) goto end; +if (entry->rcu_pending) +rcu_barrier_sched ();tracepoint_entry_free_old (entry, old);remove_tracepoint (name);/* Ignore busy error message */ ret =0 ;
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Ingo Molnar
AppliedQuoted 7 lines · Mathieu Desnoyers
The tracepoints had the same problem markers did have wrt reentrancy. Apply a similar fix using a
rcu_barrierafter each tracepoint mutex lock.Signed-off-by Mathieu Desnoyers <[email protected]>CC Ingo Molnar <[email protected]>CC "Frank Ch. Eigler" <[email protected]>CC Lai Jiangshan <[email protected]>
applied to tip/tracing/ftrace, thanks Mathieu!
Ingo