diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_stack.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 4842c969c785..d0871bc0aca5 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c | |||
@@ -308,7 +308,7 @@ stack_trace_sysctl(struct ctl_table *table, int write, | |||
308 | 308 | ||
309 | mutex_lock(&stack_sysctl_mutex); | 309 | mutex_lock(&stack_sysctl_mutex); |
310 | 310 | ||
311 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); | 311 | ret = proc_dointvec(table, write, file, buffer, lenp, ppos); |
312 | 312 | ||
313 | if (ret || !write || | 313 | if (ret || !write || |
314 | (last_stack_tracer_enabled == stack_tracer_enabled)) | 314 | (last_stack_tracer_enabled == stack_tracer_enabled)) |
@@ -326,11 +326,10 @@ stack_trace_sysctl(struct ctl_table *table, int write, | |||
326 | return ret; | 326 | return ret; |
327 | } | 327 | } |
328 | 328 | ||
329 | static int start_stack_trace __initdata; | ||
330 | |||
331 | static __init int enable_stacktrace(char *str) | 329 | static __init int enable_stacktrace(char *str) |
332 | { | 330 | { |
333 | start_stack_trace = 1; | 331 | stack_tracer_enabled = 1; |
332 | last_stack_tracer_enabled = 1; | ||
334 | return 1; | 333 | return 1; |
335 | } | 334 | } |
336 | __setup("stacktrace", enable_stacktrace); | 335 | __setup("stacktrace", enable_stacktrace); |
@@ -352,10 +351,8 @@ static __init int stack_trace_init(void) | |||
352 | if (!entry) | 351 | if (!entry) |
353 | pr_warning("Could not create debugfs 'stack_trace' entry\n"); | 352 | pr_warning("Could not create debugfs 'stack_trace' entry\n"); |
354 | 353 | ||
355 | if (start_stack_trace) { | 354 | if (stack_tracer_enabled) |
356 | register_ftrace_function(&trace_ops); | 355 | register_ftrace_function(&trace_ops); |
357 | stack_tracer_enabled = 1; | ||
358 | } | ||
359 | 356 | ||
360 | return 0; | 357 | return 0; |
361 | } | 358 | } |