[PATCH] trace/kprobe: remove duplicated call of ring_buffer_event_data
From: Song Chen
Date: Tue Oct 18 2022 - 03:25:06 EST
Function __kprobe_trace_func calls ring_buffer_event_data to get
a ring buffer, however, it has been done in above call
trace_event_buffer_reserve.
So remove one of them.
Signed-off-by: Song Chen <chensong_2000@xxxxxx>
---
kernel/trace/trace_kprobe.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 23f7f0ec4f4c..dfd5809a4a65 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1394,7 +1394,6 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
return;
fbuffer.regs = regs;
- entry = fbuffer.entry = ring_buffer_event_data(fbuffer.event);
entry->ip = (unsigned long)tk->rp.kp.addr;
store_trace_args(&entry[1], &tk->tp, regs, sizeof(*entry), dsize);
--
2.25.1