aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2008-09-30 01:51:12 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:38:23 -0400
commit9a1e9693f534174945154197fec4ec92f168ce21 (patch)
treed1477dc3492812c2f8a93afe37075857d4b1ce0f /kernel
parentca2db6cf30d6a45798b7a760d0c4f7735b16799d (diff)
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 <mathieu.desnoyers@polymtl.ca> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/tracepoint.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index db39961a0d03..f2b7c28a4708 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -356,6 +356,8 @@ int tracepoint_probe_register(const char *name, void *probe)
356 mutex_lock(&tracepoints_mutex); 356 mutex_lock(&tracepoints_mutex);
357 entry = get_tracepoint(name); 357 entry = get_tracepoint(name);
358 WARN_ON(!entry); 358 WARN_ON(!entry);
359 if (entry->rcu_pending)
360 rcu_barrier_sched();
359 tracepoint_entry_free_old(entry, old); 361 tracepoint_entry_free_old(entry, old);
360end: 362end:
361 mutex_unlock(&tracepoints_mutex); 363 mutex_unlock(&tracepoints_mutex);
@@ -392,6 +394,8 @@ int tracepoint_probe_unregister(const char *name, void *probe)
392 entry = get_tracepoint(name); 394 entry = get_tracepoint(name);
393 if (!entry) 395 if (!entry)
394 goto end; 396 goto end;
397 if (entry->rcu_pending)
398 rcu_barrier_sched();
395 tracepoint_entry_free_old(entry, old); 399 tracepoint_entry_free_old(entry, old);
396 remove_tracepoint(name); /* Ignore busy error message */ 400 remove_tracepoint(name); /* Ignore busy error message */
397 ret = 0; 401 ret = 0;