summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.c
diff options
context:
space:
mode:
authorWang Nan2015-12-07 03:36:25 +0100
committerArnaldo Carvalho de Melo2015-12-07 22:12:45 +0100
commit5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a (patch)
tree7cb0333e08d8aa028461af9fa1d37b5e12f67ac5 /tools/perf/util/machine.c
parentperf/x86: Remove old MSR perf tracing code (diff)
downloadkernel-qcow2-linux-5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a.tar.gz
kernel-qcow2-linux-5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a.tar.xz
kernel-qcow2-linux-5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a.zip
perf machine: Pass correct string to dso__adjust_kmod_long_name
There's a mistake in dso__adjust_kmod_long_name() that it use strdup() to dup the new long_name of a dso, but passes the original string to dso__set_long_name(). Which causes random crash during cleanup. Signed-off-by: Wang Nan <wangnan0@huawei.com> Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Fixes: c03d5184f0e9 ("perf machine: Adjust dso->long_name for offline module") Link: http://lkml.kernel.org/r/1449455785-42020-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.c')
-rw-r--r--tools/perf/util/machine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 95a7f6087346..bfc289c73c22 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -576,7 +576,7 @@ static void dso__adjust_kmod_long_name(struct dso *dso, const char *filename)
if (!dup_filename)
return;
- dso__set_long_name(dso, filename, true);
+ dso__set_long_name(dso, dup_filename, true);
}
struct map *machine__findnew_module_map(struct machine *machine, u64 start,