Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793AbaDGFou (ORCPT ); Mon, 7 Apr 2014 01:44:50 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:42759 "EHLO lgemrelse7q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750854AbaDGFos (ORCPT ); Mon, 7 Apr 2014 01:44:48 -0400 X-Greylist: delayed 901 seconds by postgrey-1.27 at vger.kernel.org; Mon, 07 Apr 2014 01:44:48 EDT X-Original-SENDERIP: 10.177.220.181 X-Original-MAILFROM: namhyung@gmail.com From: Namhyung Kim To: Jiri Olsa Cc: Masami Hiramatsu , Namhyung Kim , LKML , Peter Zijlstra , Arnaldo Carvalho de Melo , Paul Mackerras , Ingo Molnar Subject: Re: [PATCH -tip ] [BUGFIX] perf/probe: Fix to handle errors in line_range searching References: <20140402054831.19080.27006.stgit@ltc230.yrl.intra.hitachi.co.jp> <20140406125248.GI1164@krava.brq.redhat.com> Date: Mon, 07 Apr 2014 14:29:46 +0900 In-Reply-To: <20140406125248.GI1164@krava.brq.redhat.com> (Jiri Olsa's message of "Sun, 6 Apr 2014 14:52:48 +0200") Message-ID: <87ioqlyaet.fsf@sejong.aot.lge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 6 Apr 2014 14:52:48 +0200, Jiri Olsa wrote: > 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? Yes, Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/