From: Adrian Hunter Date: Sun, 22 Sep 2013 10:22:09 +0000 (+0300) Subject: perf machine: Fix path unpopulated in machine__create_modules() X-Git-Tag: upstream/snapshot3+hdmi~4234^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa7fe3b0c499fb7987245ac40295af03546f2bd2;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git perf machine: Fix path unpopulated in machine__create_modules() In machine__create_modules() the 'path' char array was used in a call to symbol__restricted_filename() without always being populated. Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1379845338-29637-2-git-send-email-adrian.hunter@intel.com [ Split patch removing unrelated conversion of sprintf to snprintf to perf/core ] Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 933d14f..6188d28 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -792,7 +792,7 @@ static int machine__create_modules(struct machine *machine) modules = path; } - if (symbol__restricted_filename(path, "/proc/modules")) + if (symbol__restricted_filename(modules, "/proc/modules")) return -1; file = fopen(modules, "r");