diff options
Diffstat (limited to 'kernel/trace/trace.c')
| -rw-r--r-- | kernel/trace/trace.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index d345d649d073..a610ca771558 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | 34 | ||
| 35 | #include <linux/stacktrace.h> | 35 | #include <linux/stacktrace.h> |
| 36 | #include <linux/ring_buffer.h> | 36 | #include <linux/ring_buffer.h> |
| 37 | #include <linux/irqflags.h> | ||
| 37 | 38 | ||
| 38 | #include "trace.h" | 39 | #include "trace.h" |
| 39 | 40 | ||
| @@ -851,7 +852,7 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) | |||
| 851 | preempt_enable_notrace(); | 852 | preempt_enable_notrace(); |
| 852 | } | 853 | } |
| 853 | 854 | ||
| 854 | #ifdef CONFIG_FTRACE | 855 | #ifdef CONFIG_FUNCTION_TRACER |
| 855 | static void | 856 | static void |
| 856 | function_trace_call(unsigned long ip, unsigned long parent_ip) | 857 | function_trace_call(unsigned long ip, unsigned long parent_ip) |
| 857 | { | 858 | { |
| @@ -865,9 +866,6 @@ function_trace_call(unsigned long ip, unsigned long parent_ip) | |||
| 865 | if (unlikely(!ftrace_function_enabled)) | 866 | if (unlikely(!ftrace_function_enabled)) |
| 866 | return; | 867 | return; |
| 867 | 868 | ||
| 868 | if (skip_trace(ip)) | ||
| 869 | return; | ||
| 870 | |||
| 871 | pc = preempt_count(); | 869 | pc = preempt_count(); |
| 872 | resched = need_resched(); | 870 | resched = need_resched(); |
| 873 | preempt_disable_notrace(); | 871 | preempt_disable_notrace(); |
| @@ -2379,9 +2377,10 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf, | |||
| 2379 | int i; | 2377 | int i; |
| 2380 | size_t ret; | 2378 | size_t ret; |
| 2381 | 2379 | ||
| 2380 | ret = cnt; | ||
| 2381 | |||
| 2382 | if (cnt > max_tracer_type_len) | 2382 | if (cnt > max_tracer_type_len) |
| 2383 | cnt = max_tracer_type_len; | 2383 | cnt = max_tracer_type_len; |
| 2384 | ret = cnt; | ||
| 2385 | 2384 | ||
| 2386 | if (copy_from_user(&buf, ubuf, cnt)) | 2385 | if (copy_from_user(&buf, ubuf, cnt)) |
| 2387 | return -EFAULT; | 2386 | return -EFAULT; |
| @@ -2414,8 +2413,8 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf, | |||
| 2414 | out: | 2413 | out: |
| 2415 | mutex_unlock(&trace_types_lock); | 2414 | mutex_unlock(&trace_types_lock); |
| 2416 | 2415 | ||
| 2417 | if (ret == cnt) | 2416 | if (ret > 0) |
| 2418 | filp->f_pos += cnt; | 2417 | filp->f_pos += ret; |
| 2419 | 2418 | ||
| 2420 | return ret; | 2419 | return ret; |
| 2421 | } | 2420 | } |
| @@ -3097,7 +3096,7 @@ void ftrace_dump(void) | |||
| 3097 | dump_ran = 1; | 3096 | dump_ran = 1; |
| 3098 | 3097 | ||
| 3099 | /* No turning back! */ | 3098 | /* No turning back! */ |
| 3100 | ftrace_kill_atomic(); | 3099 | ftrace_kill(); |
| 3101 | 3100 | ||
| 3102 | for_each_tracing_cpu(cpu) { | 3101 | for_each_tracing_cpu(cpu) { |
| 3103 | atomic_inc(&global_trace.data[cpu]->disabled); | 3102 | atomic_inc(&global_trace.data[cpu]->disabled); |
