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]
Message-Id: <1274234455.3603.0.camel@minggr.sh.intel.com>
Date:	Wed, 19 May 2010 10:00:55 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	Cyrill Gorcunov <gorcunov@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Paul Mundt <lethal@...ux-sh.org>,
	"eranian@...il.com" <eranian@...il.com>,
	"Gary.Mohr@...l.com" <Gary.Mohr@...l.com>,
	"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
	"Zhang, Yanmin" <yanmin_zhang@...ux.intel.com>,
	Paul Mackerras <paulus@...ba.org>,
	"David S. Miller" <davem@...emloft.net>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Will Deacon <will.deacon@....com>,
	Maynard Johnson <mpjohn@...ibm.com>,
	Carl Love <carll@...ibm.com>,
	"greg@...ah.com" <greg@...ah.com>,
	Kay Sievers <kay.sievers@...y.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH v2 02/11] perf: core, add pmu register and lookup
 functions

On Wed, 2010-05-19 at 02:38 +0800, Cyrill Gorcunov wrote:
> On Wed, May 19, 2010 at 01:45:02AM +0000, Lin Ming wrote:
> ...
> > +int perf_event_register_pmu(struct pmu *pmu)
> > +{
> > +	struct pmu *tmp;
> > +	int ret = 1;
> > +
> > +	rcu_read_lock();
> > +	list_for_each_entry_rcu(tmp, &pmus, entry) {
> > +		if (tmp->id == pmu->id) {
> > +			ret = 0;
> > +			goto err;
> 
> Hi Ming, is it supposed to get out in locked state?
> I mean imbalanced rcu_read_lock somehow suspicicous ;)

Ah, yes, that's real bug.
I'll fix it.

Thanks for review.

> 
> > +		}
> > +	}
> > +	rcu_read_unlock();
> > +
> > +	spin_lock(&pmus_lock);
> > +	list_add_tail_rcu(&pmu->entry, &pmus);
> > +	spin_unlock(&pmus_lock);
> > +
> > +err:
> > +	return ret;
> > +}
> > +
> ...
> 
> 	-- Cyrill

--
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