lkml.org 
[lkml]   [2008]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 08/16] Tracepoints : Samples fix teardown
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.

Impact: bugfix.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: "Frank Ch. Eigler" <fche@redhat.com>
CC: 'Ingo Molnar' <mingo@elte.hu>
CC: Lai Jiangshan <laijs@cn.fujitsu.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Steven Rostedt <rostedt@goodmis.org>
---
samples/tracepoints/tracepoint-probe-sample.c | 1 +
samples/tracepoints/tracepoint-probe-sample2.c | 1 +
2 files changed, 2 insertions(+)

Index: linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample.c
===================================================================
--- linux-2.6-lttng.orig/samples/tracepoints/tracepoint-probe-sample.c 2008-07-31 09:26:51.000000000 -0400
+++ linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample.c 2008-07-31 09:26:52.000000000 -0400
@@ -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: linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample2.c
===================================================================
--- linux-2.6-lttng.orig/samples/tracepoints/tracepoint-probe-sample2.c 2008-07-31 09:26:51.000000000 -0400
+++ linux-2.6-lttng/samples/tracepoints/tracepoint-probe-sample2.c 2008-07-31 09:26:52.000000000 -0400
@@ -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);
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68


\
 
 \ /
  Last update: 2008-11-15 00:07    [W:0.226 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site