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] [day] [month] [year] [list]
Date:   Wed, 3 Mar 2021 12:43:44 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Namhyung Kim <namhyung@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Ian Rogers <irogers@...gle.com>, Leo Yan <leo.yan@...aro.org>
Subject: Re: [PATCH 04/11] perf test: Fix cpu and thread map leaks in
 sw_clock_freq test

Em Tue, Mar 02, 2021 at 02:03:05PM +0100, Jiri Olsa escreveu:
> On Tue, Mar 02, 2021 at 10:50:15AM +0900, Namhyung Kim wrote:
> 
> SNIP
> 
> > > >               err = -ENOMEM;
> > > >               pr_debug("Not enough memory to create thread/cpu maps\n");
> > > > -             goto out_free_maps;
> > > > +             goto out_delete_evlist;
> > > >       }
> > > >
> > > >       perf_evlist__set_maps(&evlist->core, cpus, threads);
> > > >
> > > > -     cpus    = NULL;
> > > > -     threads = NULL;
> > >
> > > hum, so IIUC we added these and the other you remove in your patches long time ago,
> > > because there was no refcounting at that time, right?
> > 
> > It seems my original patch just set the maps directly.
> > 
> >   bc96b361cbf9 perf tests: Add a test case for checking sw clock event frequency
> > 
> > And after that Adrian changed it to use the set_maps() helper.
> > 
> >   c5e6bd2ed3e8 perf tests: Fix software clock events test setting maps
> 
> ok, and after that there's this one:
>   a55e56637613 perf evlist: Reference count the cpu and thread maps at set_maps()
> 
> forcing the get calls when storing cpus and threads
> 
> for the patchset
> 
> Acked-by: Jiri Olsa <jolsa@...hat.com>

Thanks, applied.

- Arnaldo

 
> thanks,
> jirka
> 
> > 
> > It seems we already had the refcounting at the moment.  And then the libperf
> > renaming happened later.
> > 
> > Thanks,
> > Namhyung
> > 
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ