From: Jiri Olsa <jolsa@redhat.com>
To: "Wangshaobo (bobo)" <bobo.shaobowang@huawei.com>
Cc: cj.chengjian@huawei.com, huawei.libin@huawei.com,
xiexiuqi@huawei.com, mark.rutland@arm.com, guohanjun@huawei.com,
acme@kernel.org, alexander.shishkin@linux.intel.com,
wangnan0@huawei.com, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf bpf-loader: Add missing '*' for key_scan_pos
Date: Wed, 20 May 2020 12:30:06 +0200 [thread overview]
Message-ID: <20200520103006.GA157452@krava> (raw)
In-Reply-To: <ac38c44e-ebce-28eb-37f5-bf05572b9232@huawei.com>
On Wed, May 20, 2020 at 06:22:12PM +0800, Wangshaobo (bobo) wrote:
>
> 在 2020/5/20 15:05, Jiri Olsa 写道:
> > On Wed, May 20, 2020 at 11:32:16AM +0800, Wang ShaoBo wrote:
> > > key_scan_pos is a pointer for getting scan position in
> > > bpf__obj_config_map() for each BPF map configuration term,
> > > but it's misused when error not happened.
> > >
> > > Fixes: 066dacbf2a32 ("perf bpf: Add API to set values to map entries in a bpf object")
> > > Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
> > > ---
> > > tools/perf/util/bpf-loader.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
> > > index 10c187b8b8ea..460056bc072c 100644
> > > --- a/tools/perf/util/bpf-loader.c
> > > +++ b/tools/perf/util/bpf-loader.c
> > > @@ -1225,7 +1225,7 @@ bpf__obj_config_map(struct bpf_object *obj,
> > > out:
> > > free(map_name);
> > > if (!err)
> > > - key_scan_pos += strlen(map_opt);
> > > + *key_scan_pos += strlen(map_opt);
> > seems good, was there something failing because of this?
> >
> > Acked-by: Jiri Olsa <jolsa@redhat.com>
> >
> > thanks,
> > jirka
>
> I found this problem when i checked this code, I think it is
>
> an implicit question, but if we delete the two line, the problem
>
> also no longer exists.
and what's the actual problem, what's broken?
jirka
>
> thanks,
>
> Wang ShaoBo
>
>
next prev parent reply other threads:[~2020-05-20 10:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 3:32 [PATCH] perf bpf-loader: Add missing '*' for key_scan_pos Wang ShaoBo
2020-05-20 7:05 ` Jiri Olsa
2020-05-20 10:22 ` Wangshaobo (bobo)
2020-05-20 10:30 ` Jiri Olsa [this message]
2020-05-20 14:30 ` Arnaldo Carvalho de Melo
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=20200520103006.GA157452@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bobo.shaobowang@huawei.com \
--cc=bpf@vger.kernel.org \
--cc=cj.chengjian@huawei.com \
--cc=guohanjun@huawei.com \
--cc=huawei.libin@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=wangnan0@huawei.com \
--cc=xiexiuqi@huawei.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;
as well as URLs for NNTP newsgroup(s).