blob: b697eb2622f4380b6e7d40ada17c876cda031760 [file] [log] [blame]
From 854c356004607230bf4942748ded6791a260f897 Mon Sep 17 00:00:00 2001
From: Denis Efremov <>
Date: Thu, 4 Jul 2019 20:21:10 +0300
Subject: [PATCH] tracing: Make exported ftrace_set_clr_event non-static
commit 595a438c78dbdc43d6c9db4f437267f0bd1548bf upstream.
The function ftrace_set_clr_event is declared static and marked
EXPORT_SYMBOL_GPL(), which is at best an odd combination. Because the
function was decided to be a part of API, this commit removes the static
attribute and adds the declaration to the header.
Fixes: f45d1225adb04 ("tracing: Kernel access to Ftrace instances")
Reviewed-by: Joe Jin <>
Signed-off-by: Denis Efremov <>
Signed-off-by: Steven Rostedt (VMware) <>
Signed-off-by: Paul Gortmaker <>
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 8a62731673f7..84bc84f00e8f 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -539,6 +539,7 @@ extern int trace_event_get_offsets(struct trace_event_call *call);
#define is_signed_type(type) (((type)(-1)) < (type)1)
+int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
int trace_set_clr_event(const char *system, const char *event, int set);
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index f9ca020e8a51..08d4e9a04f82 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -795,7 +795,7 @@ static int __ftrace_set_clr_event(struct trace_array *tr, const char *match,
return ret;
-static int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
+int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
char *event = NULL, *sub = NULL, *match;
int ret;