From: Wang Nan <wangnan0@huawei.com>
To: <acme@redhat.com>, <acme@kernel.org>, <namhyung@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <pi3orama@163.com>,
<lizefan@huawei.com>, Wang Nan <wangnan0@huawei.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Subject: [PATCH resend] perf machine: Pass correct string to dso__adjust_kmod_long_name
Date: Mon, 7 Dec 2015 02:36:25 +0000 [thread overview]
Message-ID: <1449455785-42020-1-git-send-email-wangnan0@huawei.com> (raw)
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.
Fixes: c03d5184f0e9("perf machine: Adjust dso->long_name for offline module")
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
---
tools/perf/util/machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 95a7f60..bfc289c 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,
--
1.8.3.4
next reply other threads:[~2015-12-07 2:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 2:36 Wang Nan [this message]
2015-12-07 3:33 ` [PATCH resend] perf machine: Pass correct string to dso__adjust_kmod_long_name 平松雅巳 / HIRAMATU,MASAMI
2015-12-08 4:30 ` [tip:perf/core] " tip-bot for Wang Nan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1449455785-42020-1-git-send-email-wangnan0@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=pi3orama@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).