Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932651AbbLHEbQ (ORCPT ); Mon, 7 Dec 2015 23:31:16 -0500 Received: from terminus.zytor.com ([198.137.202.10]:50661 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755988AbbLHEbO (ORCPT ); Mon, 7 Dec 2015 23:31:14 -0500 Date: Mon, 7 Dec 2015 20:30:41 -0800 From: tip-bot for Wang Nan Message-ID: Cc: linux-kernel@vger.kernel.org, namhyung@kernel.org, tglx@linutronix.de, mingo@kernel.org, wangnan0@huawei.com, masami.hiramatsu.pt@hitachi.com, hpa@zytor.com, lizefan@huawei.com, acme@redhat.com Reply-To: tglx@linutronix.de, namhyung@kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, wangnan0@huawei.com, hpa@zytor.com, masami.hiramatsu.pt@hitachi.com, acme@redhat.com, lizefan@huawei.com In-Reply-To: <1449455785-42020-1-git-send-email-wangnan0@huawei.com> References: <1449455785-42020-1-git-send-email-wangnan0@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf machine: Pass correct string to dso__adjust_kmod_long_name Git-Commit-ID: 5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1809 Lines: 43 Commit-ID: 5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a Gitweb: http://git.kernel.org/tip/5dcf16df3ce48b2e4f798b1a11b5de2fc3cfd73a Author: Wang Nan AuthorDate: Mon, 7 Dec 2015 02:36:25 +0000 Committer: Arnaldo Carvalho de Melo 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 Reviewed-by: Masami Hiramatsu Cc: Namhyung Kim Cc: Zefan Li 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 --- 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/