diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-11-12 07:37:53 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-11-12 07:37:53 +0100 |
commit | 492cf7a0be68676382050daa06335f56db2cdb08 (patch) | |
tree | 5dc68fcd308f62b3081773a941326e78af9418fa /tools/perf/util/probe-file.c | |
parent | perf: Fix inherited events vs. tracepoint filters (diff) | |
parent | tools include: Add compiler.h to list.h (diff) | |
download | linux-492cf7a0be68676382050daa06335f56db2cdb08.tar.xz linux-492cf7a0be68676382050daa06335f56db2cdb08.zip |
Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
- Add missing newlines to some pr_err() calls (Arnaldo Carvalho de Melo)
- Print full source file paths when using
'perf annotate --print-line --full-paths' (Michael Petlan)
- Fix 'perf probe -d' when just one out of uprobes and kprobes is
enabled (Wang Nan)
- Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)
- Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by the
'perf test' LLVM entries, when running it in-tree, to .gitignore (Yunlong Song)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/probe-file.c')
-rw-r--r-- | tools/perf/util/probe-file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c index 89dbeb92c68e..e3b3b92e4458 100644 --- a/tools/perf/util/probe-file.c +++ b/tools/perf/util/probe-file.c @@ -138,6 +138,9 @@ struct strlist *probe_file__get_rawlist(int fd) char *p; struct strlist *sl; + if (fd < 0) + return NULL; + sl = strlist__new(NULL, NULL); fp = fdopen(dup(fd), "r"); @@ -271,6 +274,9 @@ int probe_file__get_events(int fd, struct strfilter *filter, const char *p; int ret = -ENOENT; + if (!plist) + return -EINVAL; + namelist = __probe_file__get_namelist(fd, true); if (!namelist) return -ENOENT; |