lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220730030335.78203-6-yangjihong1@huawei.com>
Date:   Sat, 30 Jul 2022 11:03:33 +0800
From:   Yang Jihong <yangjihong1@...wei.com>
To:     <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
        <mark.rutland@....com>, <alexander.shishkin@...ux.intel.com>,
        <jolsa@...nel.org>, <namhyung@...nel.org>,
        <colin.i.king@...il.com>, <linux-kernel@...r.kernel.org>,
        <linux-perf-users@...r.kernel.org>
CC:     <pc@...ibm.com>, <yhs@...com>, <andrii.nakryiko@...il.com>,
        <songliubraving@...com>, <yangjihong1@...wei.com>
Subject: [PATCH v2 5/7] perf kwork: Strdup function name in workqueue_work_init

perf_session has been deleted when report, maps data in session has been free,
we need to copy duplicate of workqueue function symbol for future use.

Signed-off-by: Yang Jihong <yangjihong1@...wei.com>
---
 tools/perf/builtin-kwork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-kwork.c b/tools/perf/builtin-kwork.c
index d6c09044a929..33bcab2aafcd 100644
--- a/tools/perf/builtin-kwork.c
+++ b/tools/perf/builtin-kwork.c
@@ -1021,7 +1021,7 @@ static void workqueue_work_init(struct kwork_class *class,
 	work->cpu = sample->cpu;
 	work->id = evsel__intval(evsel, sample, "work");
 	work->name = function_addr == 0 ? NULL :
-		machine__resolve_kernel_addr(machine, &function_addr, &modp);
+		strdup(machine__resolve_kernel_addr(machine, &function_addr, &modp));
 }
 
 static void workqueue_work_name(struct kwork_work *work, char *buf, int len)
-- 
2.30.GIT

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ