diff options
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r-- | kernel/trace/trace_functions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index fcd41a166405..5a095c2e4b69 100644 --- a/kernel/trace/trace_functions.c +++ b/kernel/trace/trace_functions.c | |||
@@ -219,6 +219,8 @@ static void tracing_stop_function_trace(struct trace_array *tr) | |||
219 | unregister_ftrace_function(tr->ops); | 219 | unregister_ftrace_function(tr->ops); |
220 | } | 220 | } |
221 | 221 | ||
222 | static struct tracer function_trace; | ||
223 | |||
222 | static int | 224 | static int |
223 | func_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set) | 225 | func_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set) |
224 | { | 226 | { |
@@ -228,6 +230,10 @@ func_set_flag(struct trace_array *tr, u32 old_flags, u32 bit, int set) | |||
228 | if (!!set == !!(func_flags.val & TRACE_FUNC_OPT_STACK)) | 230 | if (!!set == !!(func_flags.val & TRACE_FUNC_OPT_STACK)) |
229 | break; | 231 | break; |
230 | 232 | ||
233 | /* We can change this flag when not running. */ | ||
234 | if (tr->current_trace != &function_trace) | ||
235 | break; | ||
236 | |||
231 | unregister_ftrace_function(tr->ops); | 237 | unregister_ftrace_function(tr->ops); |
232 | 238 | ||
233 | if (set) { | 239 | if (set) { |