Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321418
b: refs/heads/master
c: 347ed99
h: refs/heads/master
v: v3
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Aug 3, 2012
1 parent 7a2dc0e commit b7a9ef2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 56e6f602aa4432f7fe90a0d9ba379b2735b07b6b
refs/heads/master: 347ed9903a10179d1cf733d5d77072b283d89da3
10 changes: 9 additions & 1 deletion trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,6 +2875,7 @@ int machines__create_guest_kernel_maps(struct rb_root *machines)
int i, items = 0;
char path[PATH_MAX];
pid_t pid;
char *endp;

if (symbol_conf.default_guest_vmlinux_name ||
symbol_conf.default_guest_modules ||
Expand All @@ -2891,7 +2892,14 @@ int machines__create_guest_kernel_maps(struct rb_root *machines)
/* Filter out . and .. */
continue;
}
pid = atoi(namelist[i]->d_name);
pid = (pid_t)strtol(namelist[i]->d_name, &endp, 10);
if ((*endp != '\0') ||
(endp == namelist[i]->d_name) ||
(errno == ERANGE)) {
pr_debug("invalid directory (%s). Skipping.\n",
namelist[i]->d_name);
continue;
}
sprintf(path, "%s/%s/proc/kallsyms",
symbol_conf.guestmount,
namelist[i]->d_name);
Expand Down

0 comments on commit b7a9ef2

Please sign in to comment.