mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH -tip ] [BUGFIX] perf/probe: Fix to handle errors in line_range searching
Date: Sun, 6 Apr 2014 14:52:48 +0200	[thread overview]
Message-ID: <20140406125248.GI1164@krava.brq.redhat.com> (raw)
In-Reply-To: <20140402054831.19080.27006.stgit@ltc230.yrl.intra.hitachi.co.jp>

On Wed, Apr 02, 2014 at 02:48:31PM +0900, Masami Hiramatsu wrote:
> As Namhyung reported(https://lkml.org/lkml/2014/4/1/89),
> current perf-probe -L option doesn't handle errors in line-range
> searching correctly. It causes a SEGV if an error occured in the
> line-range searching.
> 
>   ----
>   $ perf probe -x ./perf -v -L map__load
>   Open Debuginfo file: /home/namhyung/project/linux/tools/perf/perf
>   fname: util/map.c, lineno:153
>   New line range: 153 to 2147483647
>   path: (null)
>   Segmentation fault (core dumped)
>   ----
> 
> This is because line_range_inline_cb() ignores errors
> from find_line_range_by_line() which means that lr->path is
> already freed on the error path in find_line_range_by_line().
> As a result, get_real_path() accesses the lr->path and it
> causes a NULL pointer exception.
> 
> This fixes line_range_inline_cb() to handle the error correctly,
> and report it to the caller.
> 
> Anyway, this just fixes a possible SEGV bug, Namhyung's patch
> is also required.

will take both.. Namhyung, ack to Masami's change?

thanks,
jirka

  reply	other threads:[~2014-04-06 12:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01  4:47 [PATCH] perf probe: Fix --line option behavior Namhyung Kim
2014-04-01  5:01 ` Masami Hiramatsu
2014-04-01  7:21   ` Namhyung Kim
2014-04-01  7:40     ` Masami Hiramatsu
2014-04-02  5:48     ` [PATCH -tip ] [BUGFIX] perf/probe: Fix to handle errors in line_range searching Masami Hiramatsu
2014-04-06 12:52       ` Jiri Olsa [this message]
2014-04-07  5:29         ` Namhyung Kim
2014-04-14 14:53       ` [tip:perf/urgent] perf probe: " tip-bot for Masami Hiramatsu
2014-04-14 14:53 ` [tip:perf/urgent] perf probe: Fix --line option behavior 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=20140406125248.GI1164@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --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

Powered by JetHome