Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751714Ab3JTTbp (ORCPT ); Sun, 20 Oct 2013 15:31:45 -0400 Received: from terminus.zytor.com ([198.137.202.10]:52606 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290Ab3JTTbo (ORCPT ); Sun, 20 Oct 2013 15:31:44 -0400 Date: Sun, 20 Oct 2013 12:31:01 -0700 From: tip-bot for Masami Hiramatsu Message-ID: Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org, mingo@redhat.com, hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl, namhyung@kernel.org, masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de Reply-To: mingo@kernel.org, hpa@zytor.com, mingo@redhat.com, paulus@samba.org, linux-kernel@vger.kernel.org, acme@redhat.com, a.p.zijlstra@chello.nl, namhyung@kernel.org, masami.hiramatsu.pt@hitachi.com, tglx@linutronix.de In-Reply-To: <20131011122317.9662.29736.stgit@kbuild-fedora.novalocal> References: <20131011122317.9662.29736.stgit@kbuild-fedora.novalocal> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf probe: Fix to initialize fname always before use it Git-Commit-ID: 1b286bdd5b7684c681b63d5e75cada037064c315 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.1 (terminus.zytor.com [127.0.0.1]); Sun, 20 Oct 2013 12:31:09 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2003 Lines: 53 Commit-ID: 1b286bdd5b7684c681b63d5e75cada037064c315 Gitweb: http://git.kernel.org/tip/1b286bdd5b7684c681b63d5e75cada037064c315 Author: Masami Hiramatsu AuthorDate: Fri, 11 Oct 2013 12:23:17 +0000 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 15 Oct 2013 14:37:38 -0300 perf probe: Fix to initialize fname always before use it Fix perf probe --list to initialize fname local var always before use it. This may cause a SEGV if there is a probe which is in the function body but not in any inline function. Problem introduced in: commit e08cfd4bda76 Author: Masami Hiramatsu Date: Mon Sep 30 18:21:44 2013 +0900 perf probe: Fix to find line information for probe list Signed-off-by: Masami Hiramatsu Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20131011122317.9662.29736.stgit@kbuild-fedora.novalocal Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/probe-finder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index c09e0a9..f069273 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -1357,10 +1357,10 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr, goto post; } + fname = dwarf_decl_file(&spdie); if (addr == (unsigned long)baseaddr) { /* Function entry - Relative line number is 0 */ lineno = baseline; - fname = dwarf_decl_file(&spdie); goto post; } -- 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/