Prev: [tip:perf/core] perf: Fix 'perf sched record' deadlock
Next: [tip:perf/core] perf probe: Fix --line syntax help and document
From: tip-bot for Masami Hiramatsu on 2 Apr 2010 15:10 Commit-ID: c9e385826d4f1ca5a72005ab8503598f791a8dc0 Gitweb: http://git.kernel.org/tip/c9e385826d4f1ca5a72005ab8503598f791a8dc0 Author: Masami Hiramatsu <mhiramat(a)redhat.com> AuthorDate: Fri, 2 Apr 2010 12:50:45 -0400 Committer: Ingo Molnar <mingo(a)elte.hu> CommitDate: Fri, 2 Apr 2010 19:35:42 +0200 perf probe: Fix not to return non-matched file Fix cu_find_realpath() not to return the last file path if that is not matched to input pattern. Signed-off-by: Masami Hiramatsu <mhiramat(a)redhat.com> Cc: Paul Mackerras <paulus(a)samba.org> Cc: Arnaldo Carvalho de Melo <acme(a)redhat.com> Cc: Peter Zijlstra <peterz(a)infradead.org> Cc: Mike Galbraith <efault(a)gmx.de> Cc: Frederic Weisbecker <fweisbec(a)gmail.com> Cc: systemtap <systemtap(a)sources.redhat.com> Cc: DLE <dle-develop(a)lists.sourceforge.net> LKML-Reference: <20100402165045.23551.47780.stgit(a)localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo(a)elte.hu> --- tools/perf/util/probe-finder.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index db52ec2..b44132e 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -183,6 +183,8 @@ static const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname) if (strtailcmp(src, fname) == 0) break; } + if (i == nfiles) + return NULL; return src; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |