]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.trace/tracepoints-samples-fix-teardown.patch
Move xen patchset to new version's subdir.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.trace / tracepoints-samples-fix-teardown.patch
CommitLineData
00e5a55c
BS
1From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
2Subject: Tracepoints : Samples fix teardown
3
4Need a tracepoint_synchronize_unregister() before the end of exit() to make sure
5every probe callers have exited the non preemptible section and thus are not
6executing 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 samples/tracepoints/tracepoint-probe-sample.c | 1 +
17 samples/tracepoints/tracepoint-probe-sample2.c | 1 +
18 2 files changed, 2 insertions(+)
19
20Index: linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample.c
21===================================================================
22--- linux-2.6-lttng.orig/samples/tracepoints/tracepoint-probe-sample.c 2008-07-31 09:26:51.000000000 -0400
23+++ linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample.c 2008-07-31 09:26:52.000000000 -0400
24@@ -46,6 +46,7 @@ void __exit tp_sample_trace_exit(void)
25 {
26 unregister_trace_subsys_eventb(probe_subsys_eventb);
27 unregister_trace_subsys_event(probe_subsys_event);
28+ tracepoint_synchronize_unregister();
29 }
30
31 module_exit(tp_sample_trace_exit);
32Index: linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample2.c
33===================================================================
34--- linux-2.6-lttng.orig/samples/tracepoints/tracepoint-probe-sample2.c 2008-07-31 09:26:51.000000000 -0400
35+++ linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample2.c 2008-07-31 09:26:52.000000000 -0400
36@@ -33,6 +33,7 @@ module_init(tp_sample_trace_init);
37 void __exit tp_sample_trace_exit(void)
38 {
39 unregister_trace_subsys_event(probe_subsys_event);
40+ tracepoint_synchronize_unregister();
41 }
42
43 module_exit(tp_sample_trace_exit);