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: <20131118044523.GA4814@kroah.com>
Date:	Sun, 17 Nov 2013 20:45:23 -0800
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Dave Jones <davej@...hat.com>, Al Viro <viro@...IV.linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sysfs: use a separate locking class for open files
 depending on mmap

On Sun, Nov 17, 2013 at 12:29:37PM +0900, Tejun Heo wrote:
> On Sat, Nov 16, 2013 at 10:21:19PM -0500, Dave Jones wrote:
> > On Sun, Nov 17, 2013 at 11:17:36AM +0900, Tejun Heo wrote:
> > 
> >  
> >  > +	if (has_mmap)
> >  > +		mutex_init(&of->mutex);
> >  > +	else
> >  > +		mutex_init(&of->mutex);
> > 
> > ummm...
> 
> Supposed to look that way.  It'll give two separate static lock class
> keys to of->mutex.  Yeah, looks weird.  Any better ideas?

Doesn't gcc optimize that away to just one lock class anyway?

greg k-h
--
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