[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200323105902.GD1534489@krava>
Date: Mon, 23 Mar 2020 11:59:02 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Leo Yan <leo.yan@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf parse-events: fix memory leaks found on parse_events
On Wed, Mar 18, 2020 at 08:56:26PM -0700, Ian Rogers wrote:
> On Wed, Mar 18, 2020 at 3:40 AM Jiri Olsa <jolsa@...hat.com> wrote:
> >
> > On Sun, Mar 15, 2020 at 09:14:31PM -0700, Ian Rogers wrote:
> > > Memory leaks found by applying LLVM's libfuzzer on the parse_events
> > > function.
> > >
> > > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > > ---
> > > tools/lib/perf/evlist.c | 2 ++
> > > tools/perf/util/parse-events.c | 2 ++
> > > tools/perf/util/parse-events.y | 3 ++-
> > > 3 files changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
> > > index 5b9f2ca50591..6485d1438f75 100644
> > > --- a/tools/lib/perf/evlist.c
> > > +++ b/tools/lib/perf/evlist.c
> > > @@ -125,8 +125,10 @@ 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);
> >
> > ugh, yes, could you please put it to separate libperf patch?
>
> Done. https://lkml.org/lkml/2020/3/18/1318
>
> > > perf_thread_map__put(evlist->threads);
> > > evlist->cpus = NULL;
> > > + evlist->all_cpus = NULL;
> >
> > there's already change adding this waiting on the list:
> > https://lore.kernel.org/lkml/1583665157-349023-1-git-send-email-zhe.he@windriver.com/
Arnaldo, could you plz pull this one ^^^ ?
thanks,
jirka
Powered by blists - more mailing lists