This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[tip:perf/core] perf probe: Fix to close dwarf when failing to analyze it
- From: tip-bot for Masami Hiramatsu <mhiramat at redhat dot com>
- To: linux-tip-commits at vger dot kernel dot org
- Cc: linux-kernel at vger dot kernel dot org, acme at redhat dot com, paulus at samba dot org, hpa at zytor dot com, mingo at redhat dot com, efault at gmx dot de, peterz at infradead dot org, dle-develop at lists dot sourceforge dot net, fweisbec at gmail dot com, tglx at linutronix dot de, mhiramat at redhat dot com, mingo at elte dot hu, systemtap at sources dot redhat dot com
- Date: Fri, 2 Apr 2010 19:08:53 GMT
- Subject: [tip:perf/core] perf probe: Fix to close dwarf when failing to analyze it
- Git-commit-id: 75ec5a245c7763c397f31ec8964d0a46c54a7386
- References: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
- Reply-to: mingo at redhat dot com, hpa at zytor dot com, paulus at samba dot org, acme at redhat dot com, linux-kernel at vger dot kernel dot org, peterz at infradead dot org, efault at gmx dot de, dle-develop at lists dot sourceforge dot net, fweisbec at gmail dot com, tglx at linutronix dot de, mhiramat at redhat dot com, systemtap at sources dot redhat dot com, mingo at elte dot hu
Commit-ID: 75ec5a245c7763c397f31ec8964d0a46c54a7386
Gitweb: http://git.kernel.org/tip/75ec5a245c7763c397f31ec8964d0a46c54a7386
Author: Masami Hiramatsu <mhiramat@redhat.com>
AuthorDate: Fri, 2 Apr 2010 12:50:59 -0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 19:35:44 +0200
perf probe: Fix to close dwarf when failing to analyze it
Fix to close libdw routine when failing to analyze it in
find_perf_probe_point().
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/util/probe-finder.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 59b0115..a851377 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -818,8 +818,10 @@ int find_perf_probe_point(int fd, unsigned long addr,
return -ENOENT;
/* Find cu die */
- if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie))
- return -EINVAL;
+ if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie)) {
+ ret = -EINVAL;
+ goto end;
+ }
/* Find a corresponding line */
line = dwarf_getsrc_die(&cudie, (Dwarf_Addr)addr);