aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_kprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_kprobe.c')
-rw-r--r--kernel/trace/trace_kprobe.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index d8061c3e02c9..934078bca3f9 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -960,8 +960,8 @@ static __kprobes void kprobe_trace_func(struct kprobe *kp, struct pt_regs *regs)
960 960
961 size = SIZEOF_KPROBE_TRACE_ENTRY(tp->nr_args); 961 size = SIZEOF_KPROBE_TRACE_ENTRY(tp->nr_args);
962 962
963 event = trace_current_buffer_lock_reserve(&buffer, call->id, size, 963 event = trace_current_buffer_lock_reserve(&buffer, call->event.type,
964 irq_flags, pc); 964 size, irq_flags, pc);
965 if (!event) 965 if (!event)
966 return; 966 return;
967 967
@@ -992,8 +992,8 @@ static __kprobes void kretprobe_trace_func(struct kretprobe_instance *ri,
992 992
993 size = SIZEOF_KRETPROBE_TRACE_ENTRY(tp->nr_args); 993 size = SIZEOF_KRETPROBE_TRACE_ENTRY(tp->nr_args);
994 994
995 event = trace_current_buffer_lock_reserve(&buffer, call->id, size, 995 event = trace_current_buffer_lock_reserve(&buffer, call->event.type,
996 irq_flags, pc); 996 size, irq_flags, pc);
997 if (!event) 997 if (!event)
998 return; 998 return;
999 999
@@ -1228,7 +1228,8 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp,
1228 "profile buffer not large enough")) 1228 "profile buffer not large enough"))
1229 return; 1229 return;
1230 1230
1231 entry = perf_trace_buf_prepare(size, call->id, &rctx, &irq_flags); 1231 entry = perf_trace_buf_prepare(size, call->event.type,
1232 &rctx, &irq_flags);
1232 if (!entry) 1233 if (!entry)
1233 return; 1234 return;
1234 1235
@@ -1258,7 +1259,8 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri,
1258 "profile buffer not large enough")) 1259 "profile buffer not large enough"))
1259 return; 1260 return;
1260 1261
1261 entry = perf_trace_buf_prepare(size, call->id, &rctx, &irq_flags); 1262 entry = perf_trace_buf_prepare(size, call->event.type,
1263 &rctx, &irq_flags);
1262 if (!entry) 1264 if (!entry)
1263 return; 1265 return;
1264 1266
@@ -1375,8 +1377,8 @@ static int register_probe_event(struct trace_probe *tp)
1375 } 1377 }
1376 if (set_print_fmt(tp) < 0) 1378 if (set_print_fmt(tp) < 0)
1377 return -ENOMEM; 1379 return -ENOMEM;
1378 call->id = register_ftrace_event(&call->event); 1380 ret = register_ftrace_event(&call->event);
1379 if (!call->id) { 1381 if (!ret) {
1380 kfree(call->print_fmt); 1382 kfree(call->print_fmt);
1381 return -ENODEV; 1383 return -ENODEV;
1382 } 1384 }