]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> |
2 | Subject: Tracepoints : tracepoint_synchronize_unregister() | |
3 | ||
4 | Create tracepoint_synchronize_unregister() which must be called before the end | |
5 | of exit() to make sure every probe callers have exited the non preemptible | |
6 | section and thus are not 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 | include/linux/tracepoint.h | 7 +++++++ | |
17 | 1 file changed, 7 insertions(+) | |
18 | ||
19 | Index: linux-2.6-lttng/include/linux/tracepoint.h | |
20 | =================================================================== | |
21 | --- linux-2.6-lttng.orig/include/linux/tracepoint.h 2008-07-31 09:21:40.000000000 -0400 | |
22 | +++ linux-2.6-lttng/include/linux/tracepoint.h 2008-07-31 09:22:27.000000000 -0400 | |
23 | @@ -124,4 +124,11 @@ extern void tracepoint_iter_reset(struct | |
24 | extern int tracepoint_get_iter_range(struct tracepoint **tracepoint, | |
25 | struct tracepoint *begin, struct tracepoint *end); | |
26 | ||
27 | +/* | |
28 | + * tracepoint_synchronize_unregister must be called between the last tracepoint | |
29 | + * probe unregistration and the end of module exit to make sure there is no | |
30 | + * caller executing a probe when it is freed. | |
31 | + */ | |
32 | +#define tracepoint_synchronize_unregister() synchronize_sched() | |
33 | + | |
34 | #endif |