diff options
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index e71ffd4eccb5..7b16d40bd64d 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -27,12 +27,6 @@ | |||
27 | 27 | ||
28 | DEFINE_MUTEX(event_mutex); | 28 | DEFINE_MUTEX(event_mutex); |
29 | 29 | ||
30 | DEFINE_MUTEX(event_storage_mutex); | ||
31 | EXPORT_SYMBOL_GPL(event_storage_mutex); | ||
32 | |||
33 | char event_storage[EVENT_STORAGE_SIZE]; | ||
34 | EXPORT_SYMBOL_GPL(event_storage); | ||
35 | |||
36 | LIST_HEAD(ftrace_events); | 30 | LIST_HEAD(ftrace_events); |
37 | static LIST_HEAD(ftrace_common_fields); | 31 | static LIST_HEAD(ftrace_common_fields); |
38 | 32 | ||
@@ -1777,6 +1771,16 @@ static void trace_module_add_events(struct module *mod) | |||
1777 | { | 1771 | { |
1778 | struct ftrace_event_call **call, **start, **end; | 1772 | struct ftrace_event_call **call, **start, **end; |
1779 | 1773 | ||
1774 | if (!mod->num_trace_events) | ||
1775 | return; | ||
1776 | |||
1777 | /* Don't add infrastructure for mods without tracepoints */ | ||
1778 | if (trace_module_has_bad_taint(mod)) { | ||
1779 | pr_err("%s: module has bad taint, not creating trace events\n", | ||
1780 | mod->name); | ||
1781 | return; | ||
1782 | } | ||
1783 | |||
1780 | start = mod->trace_events; | 1784 | start = mod->trace_events; |
1781 | end = mod->trace_events + mod->num_trace_events; | 1785 | end = mod->trace_events + mod->num_trace_events; |
1782 | 1786 | ||