[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wq6qnzfv.fsf@sejong.aot.lge.com>
Date: Thu, 20 Nov 2014 15:44:36 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...nel.org>,
Paul Mackerras <paulus@...ba.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
David Ahern <dsahern@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Jiri Olsa <jolsa@...hat.com>
Subject: Re: [PATCH] perf tools: Fix segfault due to invalid kernel dso access
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@...hat.com>
> Tested-by: Jiri Olsa <jolsa@...hat.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists