]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.trace/tracepoints-samples-fix-teardown.patch
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.trace / tracepoints-samples-fix-teardown.patch
1 From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
2 Subject: Tracepoints : Samples fix teardown
3
4 Need a tracepoint_synchronize_unregister() before the end of exit() to make sure
5 every probe callers have exited the non preemptible section and thus are not
6 executing the probe code anymore.
7
8 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
9 CC: Rusty Russell <rusty@rustcorp.com.au>
10 CC: "Frank Ch. Eigler" <fche@redhat.com>
11 CC: Ingo Molnar <mingo@elte.hu>
12 CC: Peter Zijlstra <peterz@infradead.org>
13 CC: Steven Rostedt <rostedt@goodmis.org>
14 Acked-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
20 Index: 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);
32 Index: 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);