summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_output.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-06-09 17:29:07 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-06-09 17:29:07 -0400
commit110bf2b764eb6026b868d84499263cb24b1bcc8d (patch)
tree66c869f6f96497051c4bda0797e234b3f7b39e8f /kernel/trace/trace_output.h
parent725c624a58a10ef90a2ff889e122158fabf36147 (diff)
tracing: add protection around module events unload
When reading the trace buffer, there is a race that when a module is unloaded it removes events that is stilled referenced in the buffers. This patch adds the protection around the unloading of the events from modules and the reading of the trace buffers. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_output.h')
-rw-r--r--kernel/trace/trace_output.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/trace_output.h b/kernel/trace/trace_output.h
index ac240e76eb01..d38bec4a9c30 100644
--- a/kernel/trace/trace_output.h
+++ b/kernel/trace/trace_output.h
@@ -27,6 +27,10 @@ extern struct trace_event *ftrace_find_event(int type);
extern enum print_line_t trace_nop_print(struct trace_iterator *iter,
int flags);
+/* used by module unregistering */
+extern int __unregister_ftrace_event(struct trace_event *event);
+extern struct rw_semaphore trace_event_mutex;
+
#define MAX_MEMHEX_BYTES 8
#define HEX_CHARS (MAX_MEMHEX_BYTES*2 + 1)