From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf script: avoid null dereference on symbol
Date: Wed, 22 Apr 2020 10:59:49 -0300 [thread overview]
Message-ID: <20200422135949.GD20647@kernel.org> (raw)
In-Reply-To: <20200422082016.GE962614@krava>
Em Wed, Apr 22, 2020 at 10:20:16AM +0200, Jiri Olsa escreveu:
> On Mon, Apr 20, 2020 at 05:43:29PM -0700, Ian Rogers wrote:
> > al->sym may be null given current if conditions and may cause a segv.
> >
> > Fixes: cd2bedb7863e9 (perf script: Allow --symbol to accept hexadecimal addresses)
>
> seems it's wrong commit number, I see it under d2bedb7863e9
Thanks, added your Acked-by, I noticed the wrong commit number, fixed it
up to the same you point above.
- Arnaldo
>
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> > tools/perf/util/event.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
> > index dc0e11214ae1..f581550a3015 100644
> > --- a/tools/perf/util/event.c
> > +++ b/tools/perf/util/event.c
> > @@ -626,7 +626,7 @@ int machine__resolve(struct machine *machine, struct addr_location *al,
> > ret = strlist__has_entry(symbol_conf.sym_list,
> > al->sym->name);
> > }
> > - if (!(ret && al->sym)) {
> > + if (!ret && al->sym) {
>
> Acked-by: Jiri Olsa <jolsa@redhat.com>
>
> thanks,
> jirka
>
> > snprintf(al_addr_str, sz, "0x%"PRIx64,
> > al->map->unmap_ip(al->map, al->sym->start));
> > ret = strlist__has_entry(symbol_conf.sym_list,
> > --
> > 2.26.1.301.g55bc3eb7cb9-goog
> >
>
--
- Arnaldo
next prev parent reply other threads:[~2020-04-22 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 0:43 Ian Rogers
2020-04-22 8:20 ` Jiri Olsa
2020-04-22 13:59 ` Arnaldo Carvalho de Melo [this message]
2020-04-22 15:35 ` Ian Rogers
2020-05-08 13:05 ` [tip: perf/core] perf script: Avoid NULL " tip-bot2 for Ian Rogers
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=20200422135949.GD20647@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/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
Powered by JetHome