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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110929132455.GA10995@opensource.wolfsonmicro.com>
Date:	Thu, 29 Sep 2011 14:24:55 +0100
From:	Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH 8/8] regmap: Ensure we scream if we enable cache
	bypass/only at the same time

On Thu, Sep 29, 2011 at 11:25:30AM +0100, Mark Brown wrote:
> On Thu, Sep 29, 2011 at 10:39:13AM +0100, Dimitris Papastamos wrote:
> 
> >  void regcache_cache_only(struct regmap *map, bool enable)
> >  {
> > +	BUG_ON(map->cache_bypass && enable);
> >  	mutex_lock(&map->lock);
> 
> I'd move these inside the lock otherwise there's an enable/enable race
> where two threads check that things are safe simultaneously.  I'd also
> change to WARN_ON(), if nothing else it's hard to see BUG_ON()s that
> occur prior to console output and PMICs are likely to trigger that sort
> of stuff.

Aw yes, of course :)
--
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