summaryrefslogtreecommitdiffstats
path: root/samples/tracepoints/tracepoint-probe-sample2.c
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2008-11-14 23:47:41 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-16 09:01:30 +0100
commit2504ea5edfebb14133b8571c20785cdc077e07d2 (patch)
treea3dd7de2b0f78004e6b579fca3362c676c2c0298 /samples/tracepoints/tracepoint-probe-sample2.c
parentmarkers: create DEFINE_MARKER and GET_MARKER (new API) (diff)
downloadlinux-2504ea5edfebb14133b8571c20785cdc077e07d2.tar.xz
linux-2504ea5edfebb14133b8571c20785cdc077e07d2.zip
tracepoints: samples, fix teardown
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>
Diffstat (limited to '')
-rw-r--r--samples/tracepoints/tracepoint-probe-sample2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/tracepoints/tracepoint-probe-sample2.c b/samples/tracepoints/tracepoint-probe-sample2.c
index 5e9fcf4afffe..685a5acb4562 100644
--- a/samples/tracepoints/tracepoint-probe-sample2.c
+++ b/samples/tracepoints/tracepoint-probe-sample2.c
@@ -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);