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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151006084035.GB20713@danjae.theccd.local>
Date:	Tue, 6 Oct 2015 17:40:35 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	David Ahern <dsahern@...il.com>,
	Andi Kleen <andi@...stfloor.org>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [RFC/PATCH 03/38] perf tools: Move auxtrace_mmap field to struct
 perf_evlist

On Mon, Oct 05, 2015 at 03:14:34PM +0200, Jiri Olsa wrote:
> On Fri, Oct 02, 2015 at 02:18:44PM +0900, Namhyung Kim wrote:
> 
> SNIP
> 
> > @@ -838,7 +841,7 @@ void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
> >  		perf_mmap__write_tail(md, old);
> >  	}
> >  
> > -	if (atomic_read(&md->refcnt) == 1 && perf_mmap__empty(md))
> > +	if (atomic_read(&md->refcnt) == 1 && perf_evlist__mmap_empty(evlist, idx))
> >  		perf_evlist__mmap_put(evlist, idx);
> >  }
> >  
> > @@ -879,7 +882,7 @@ static void __perf_evlist__munmap(struct perf_evlist *evlist, int idx)
> >  		evlist->mmap[idx].base = NULL;
> >  		atomic_set(&evlist->mmap[idx].refcnt, 0);
> >  	}
> > -	auxtrace_mmap__munmap(&evlist->mmap[idx].auxtrace_mmap);
> > +	auxtrace_mmap__munmap(&evlist->auxtrace_mmap[idx]);
> >  }
> >  
> >  void perf_evlist__munmap(struct perf_evlist *evlist)
> > @@ -901,7 +904,15 @@ static int perf_evlist__alloc_mmap(struct perf_evlist *evlist)
> >  	if (cpu_map__empty(evlist->cpus))
> >  		evlist->nr_mmaps = thread_map__nr(evlist->threads);
> >  	evlist->mmap = zalloc(evlist->nr_mmaps * sizeof(struct perf_mmap));
> > -	return evlist->mmap != NULL ? 0 : -ENOMEM;
> > +	if (evlist->mmap == NULL)
> > +		return -ENOMEM;
> > +	evlist->auxtrace_mmap = calloc(evlist->nr_mmaps,
> > +				       sizeof(struct auxtrace_mmap));
> > +	if (evlist->auxtrace_mmap == NULL) {
> > +		zfree(&evlist->mmap);
> > +		return -ENOMEM;
> > +	}
> 
> can't see evlist->auxtrace_mmap being freed 

Ooops, will add.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ