From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
Namhyung Kim <namhyung.kim@lge.com>,
LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH] perf tools: Fix segfault due to invalid kernel dso access
Date: Thu, 20 Nov 2014 15:44:36 +0900 [thread overview]
Message-ID: <87wq6qnzfv.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1416285028-30572-1-git-send-email-namhyung@kernel.org> (Namhyung Kim's message of "Tue, 18 Nov 2014 13:30:28 +0900")
Arnaldo,
Could you please consider applying this?
Thanks,
Namhyung
On Tue, 18 Nov 2014 13:30:28 +0900, Namhyung Kim wrote:
> Jiri reported that the commit 96d78059d6d9 ("perf tools: Make vmlinux
> short name more like kallsyms short name") segfaults on perf script.
>
> When processing kernel mmap event, it should access the 'kernel'
> variable as sometimes it cannot find a matching dso from build-id
> table so 'dso' might be invalid.
>
> Reported-by: Jiri Olsa <jolsa@redhat.com>
> Tested-by: Jiri Olsa <jolsa@redhat.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/machine.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index 52e94902afb1..85033d80fd6a 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -1106,8 +1106,8 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
> if (__machine__create_kernel_maps(machine, kernel) < 0)
> goto out_problem;
>
> - if (strstr(dso->long_name, "vmlinux"))
> - dso__set_short_name(dso, "[kernel.vmlinux]", false);
> + if (strstr(kernel->long_name, "vmlinux"))
> + dso__set_short_name(kernel, "[kernel.vmlinux]", false);
>
> machine__set_kernel_mmap_len(machine, event);
next prev parent reply other threads:[~2014-11-20 6:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 4:30 Namhyung Kim
2014-11-20 6:44 ` Namhyung Kim [this message]
2014-11-20 20:52 ` Arnaldo Carvalho de Melo
2014-12-08 6:49 ` [tip:perf/core] " tip-bot for Namhyung Kim
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=87wq6qnzfv.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=paulus@samba.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
all inboxes | Powered by JetHome®