Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1284970 > unrolled thread
| Started by | Wang Nan <wangnan0@huawei.com> |
|---|---|
| First post | 2015-12-07 03:40 +0100 |
| Last post | 2015-12-08 05:40 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH resend] perf machine: Pass correct string to dso__adjust_kmod_long_name Wang Nan <wangnan0@huawei.com> - 2015-12-07 03:40 +0100
RE: [PATCH resend] perf machine: Pass correct string to dso__adjust_kmod_long_name 平松雅巳 / HIRAMATU,MASAMI <masami.hiramatsu.pt@hitachi.com> - 2015-12-07 04:40 +0100
[tip:perf/core] perf machine: Pass correct string to dso__adjust_kmod_long_name tip-bot for Wang Nan <tipbot@zytor.com> - 2015-12-08 05:40 +0100
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Date | 2015-12-07 03:40 +0100 |
| Subject | [PATCH resend] perf machine: Pass correct string to dso__adjust_kmod_long_name |
| Message-ID | <qCTSx-6PC-9@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | 平松雅巳 / HIRAMATU,MASAMI <masami.hiramatsu.pt@hitachi.com> |
|---|---|
| Date | 2015-12-07 04:40 +0100 |
| Subject | RE: [PATCH resend] perf machine: Pass correct string to dso__adjust_kmod_long_name |
| Message-ID | <qCUOB-7x0-9@gated-at.bofh.it> |
| In reply to | #1284970 |
PkZyb206IFdhbmcgTmFuIFttYWlsdG86d2FuZ25hbjBAaHVhd2VpLmNvbV0NCj4NCj5UaGVyZSdz IGEgbWlzdGFrZSBpbiBkc29fX2FkanVzdF9rbW9kX2xvbmdfbmFtZSgpIHRoYXQsIGl0IHVzZSBz dHJkdXAoKQ0KPnRvIGR1cCB0aGUgbmV3IGxvbmdfbmFtZSBvZiBhIGRzbywgYnV0IHBhc3NlcyB0 aGUgb3JpZ2luYWwgc3RyaW5nDQo+dG8gZHNvX19zZXRfbG9uZ19uYW1lKCkuIFdoaWNoIGNhdXNl cyByYW5kb20gY3Jhc2ggZHVyaW5nIGNsZWFudXAuDQo+DQoNCkxvb2tzIGdvb2QgdG8gbWU6KQ0K DQpSZXZpZXdlZC1ieTogTWFzYW1pIEhpcmFtYXRzdSA8bWFzYW1pLmhpcmFtYXRzdS5wdEBoaXRh Y2hpLmNvbT4NCg0KVGhhbmtzIQ0KDQo+Rml4ZXM6IGMwM2Q1MTg0ZjBlOSgicGVyZiBtYWNoaW5l OiBBZGp1c3QgZHNvLT5sb25nX25hbWUgZm9yIG9mZmxpbmUgbW9kdWxlIikNCj5TaWduZWQtb2Zm LWJ5OiBXYW5nIE5hbiA8d2FuZ25hbjBAaHVhd2VpLmNvbT4NCj5DYzogQXJuYWxkbyBDYXJ2Y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NCg0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Wang Nan <tipbot@zytor.com> |
|---|---|
| Date | 2015-12-08 05:40 +0100 |
| Subject | [tip:perf/core] perf machine: Pass correct string to dso__adjust_kmod_long_name |
| Message-ID | <qDiee-5VW-33@gated-at.bofh.it> |
| In reply to | #1284970 |
Commit-ID: 5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a
Gitweb: http://git.kernel.org/tip/5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a
Author: Wang Nan <wangnan0@huawei.com>
AuthorDate: Mon, 7 Dec 2015 02:36:25 +0000
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Dec 2015 18:12:45 -0300
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>
---
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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web