]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.trace/tracepoints-tracepoint-synchronize-unregister.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.trace / tracepoints-tracepoint-synchronize-unregister.patch
CommitLineData
2cb7cef9
BS
1From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
2Subject: Tracepoints : tracepoint_synchronize_unregister()
3
4Create tracepoint_synchronize_unregister() which must be called before the end
5of exit() to make sure every probe callers have exited the non preemptible
6section and thus are not executing the probe code anymore.
7
8Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
9CC: Rusty Russell <rusty@rustcorp.com.au>
10CC: "Frank Ch. Eigler" <fche@redhat.com>
11CC: Ingo Molnar <mingo@elte.hu>
12CC: Peter Zijlstra <peterz@infradead.org>
13CC: Steven Rostedt <rostedt@goodmis.org>
14Acked-by: Jan Blunck <jblunck@suse.de>
15---
16 include/linux/tracepoint.h | 7 +++++++
17 1 file changed, 7 insertions(+)
18
19Index: linux-2.6-lttng/include/linux/tracepoint.h
20===================================================================
21--- linux-2.6-lttng.orig/include/linux/tracepoint.h 2008-07-31 09:21:40.000000000 -0400
22+++ linux-2.6-lttng/include/linux/tracepoint.h 2008-07-31 09:22:27.000000000 -0400
23@@ -124,4 +124,11 @@ extern void tracepoint_iter_reset(struct
24 extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,
25 struct tracepoint *begin, struct tracepoint *end);
26
27+/*
28+ * tracepoint_synchronize_unregister must be called between the last tracepoint
29+ * probe unregistration and the end of module exit to make sure there is no
30+ * caller executing a probe when it is freed.
31+ */
32+#define tracepoint_synchronize_unregister() synchronize_sched()
33+
34 #endif