]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
tracepoints: samples, fix teardown
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 14 Nov 2008 22:47:41 +0000 (17:47 -0500)
committerIngo Molnar <mingo@elte.hu>
Sun, 16 Nov 2008 08:01:30 +0000 (09:01 +0100)
Impact: fix a bug in sample tracepoints

Need a tracepoint_synchronize_unregister() before the end of exit() to
make sure every probe callers have exited the non preemptible section
and thus are not executing the probe code anymore.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
samples/tracepoints/tracepoint-probe-sample.c
samples/tracepoints/tracepoint-probe-sample2.c

index 55abfdda4bd4eeedcf06b034dc7f09ac0688f26e..e3a964889dc7951565b3f45497e0e123762ebab5 100644 (file)
@@ -46,6 +46,7 @@ void __exit tp_sample_trace_exit(void)
 {
        unregister_trace_subsys_eventb(probe_subsys_eventb);
        unregister_trace_subsys_event(probe_subsys_event);
+       tracepoint_synchronize_unregister();
 }
 
 module_exit(tp_sample_trace_exit);
index 5e9fcf4afffeca97bd30befd00f881bc3b28064f..685a5acb456275dd5459891caaa9f29abbdfa2d2 100644 (file)
@@ -33,6 +33,7 @@ module_init(tp_sample_trace_init);
 void __exit tp_sample_trace_exit(void)
 {
        unregister_trace_subsys_event(probe_subsys_event);
+       tracepoint_synchronize_unregister();
 }
 
 module_exit(tp_sample_trace_exit);