mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Song Chen <chensong_2000@189.cn>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	xiehuan09@gmail.com, Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH] trace/kprobe: remove duplicated call of ring_buffer_event_data
Date: Tue, 18 Oct 2022 09:59:32 -0400	[thread overview]
Message-ID: <20221018095932.7b955e96@gandalf.local.home> (raw)
In-Reply-To: <1666077186-6042-1-git-send-email-chensong_2000@189.cn>


[ Added Masami who's the new co-maintainer, and this is his code ]

On Tue, 18 Oct 2022 15:13:06 +0800
Song Chen <chensong_2000@189.cn> wrote:

> 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.
> 

May as well add:

Fixes: 5e6cd84e2f8bd ("tracing/kprobes: Do not open code event reserve logic")

Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve


> Signed-off-by: Song Chen <chensong_2000@189.cn>
> ---
>  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);
>  


  reply	other threads:[~2022-10-18 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  7:13 Song Chen
2022-10-18 13:59 ` Steven Rostedt [this message]
2022-10-18 15:22   ` Masami Hiramatsu
2022-10-19  1:27     ` Song Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221018095932.7b955e96@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=chensong_2000@189.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=xiehuan09@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®