[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <158894310133.8414.12761535620114506171.tip-bot2@tip-bot2>
Date: Fri, 08 May 2020 13:05:01 -0000
From: "tip-bot2 for Ian Rogers" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
Leo Yan <leo.yan@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Stephane Eranian <eranian@...gle.com>,
clang-built-linux@...glegroups.com,
Arnaldo Carvalho de Melo <acme@...hat.com>,
x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [tip: perf/core] libperf evlist: Fix a refcount leak
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 4599d292128d89e4cf866a0ea9a9b047a2de8418
Gitweb: https://git.kernel.org/tip/4599d292128d89e4cf866a0ea9a9b047a2de8418
Author: Ian Rogers <irogers@...gle.com>
AuthorDate: Wed, 18 Mar 2020 19:31:01 -07:00
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitterDate: Tue, 05 May 2020 16:35:29 -03:00
libperf evlist: Fix a refcount leak
Memory leaks found by applying LLVM's libfuzzer on the tools/perf
parse_events function.
Signed-off-by: Ian Rogers <irogers@...gle.com>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Leo Yan <leo.yan@...aro.org>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: clang-built-linux@...glegroups.com
Link: http://lore.kernel.org/lkml/20200319023101.82458-2-irogers@google.com
[ Did a minor adjustment due to some other previous patch having already set evlist->all_cpus to NULL at perf_evlist__exit() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/lib/perf/evlist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
index c481b62..6a875a0 100644
--- a/tools/lib/perf/evlist.c
+++ b/tools/lib/perf/evlist.c
@@ -123,6 +123,7 @@ static void perf_evlist__purge(struct perf_evlist *evlist)
void perf_evlist__exit(struct perf_evlist *evlist)
{
perf_cpu_map__put(evlist->cpus);
+ perf_cpu_map__put(evlist->all_cpus);
perf_thread_map__put(evlist->threads);
evlist->cpus = NULL;
evlist->all_cpus = NULL;
Powered by blists - more mailing lists