* [PATCH] Tracepoints fix reentrancy
@ 2008-09-30 5:51 Mathieu Desnoyers
2008-09-30 7:10 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2008-09-30 5:51 UTC (permalink / raw)
To: Ingo Molnar, Frank Ch. Eigler, Lai Jiangshan; +Cc: linux-kernel
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>
CC: Ingo Molnar <mingo@elte.hu>
CC: "Frank Ch. Eigler" <fche@redhat.com>
CC: Lai Jiangshan <laijs@cn.fujitsu.com>
---
kernel/tracepoint.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-2.6-lttng/kernel/tracepoint.c
===================================================================
--- linux-2.6-lttng.orig/kernel/tracepoint.c 2008-09-30 01:38:39.000000000 -0400
+++ linux-2.6-lttng/kernel/tracepoint.c 2008-09-30 01:39:56.000000000 -0400
@@ -361,6 +361,8 @@ int tracepoint_probe_register(const char
mutex_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;
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Tracepoints fix reentrancy
2008-09-30 5:51 [PATCH] Tracepoints fix reentrancy Mathieu Desnoyers
@ 2008-09-30 7:10 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-09-30 7:10 UTC (permalink / raw)
To: Mathieu Desnoyers; +Cc: Frank Ch. Eigler, Lai Jiangshan, linux-kernel
* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> 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>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: "Frank Ch. Eigler" <fche@redhat.com>
> CC: Lai Jiangshan <laijs@cn.fujitsu.com>
applied to tip/tracing/ftrace, thanks Mathieu!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-30 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 5:51 [PATCH] Tracepoints fix reentrancy Mathieu Desnoyers
2008-09-30 7:10 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.