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: <20131203211028.GN8277@htj.dyndns.org>
Date:	Tue, 3 Dec 2013 16:10:28 -0500
From:	Tejun Heo <tj@...nel.org>
To:	Dave Jones <davej@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	gregkh@...uxfoundation.org
Subject: Re: sysfs: use a separate locking class for open files depending on
 mmap

Hello, Dave.

On Tue, Dec 03, 2013 at 01:43:24PM -0500, Dave Jones wrote:
>  > +	/*
>  > +	 * The following is done to give a different lockdep key to
>  > +	 * @of->mutex for files which implement mmap.  This is a rather
>  > +	 * crude way to avoid false positive lockdep warning around
>  > +	 * mm->mmap_sem - mmap nests @of->mutex under mm->mmap_sem and
>  > +	 * reading /sys/block/sda/trace/act_mask grabs sr_mutex, under
>  > +	 * which mm->mmap_sem nests, while holding @of->mutex.  As each
>  > +	 * open file has a separate mutex, it's okay as long as those don't
>  > +	 * happen on the same file.  At this point, we can't easily give
>  > +	 * each file a separate locking class.  Let's differentiate on
>  > +	 * whether the file has mmap or not for now.
>  > +	 */
>  > +	if (has_mmap)
>  > +		mutex_init(&of->mutex);
>  > +	else
>  > +		mutex_init(&of->mutex);
>  > +
>  
> Somehow I just triggered this trace again, even with this commit applied.
> The trace is pretty much identical to the old one.

Hah, ain't that weird.  That's the trace you reported on the other
mail, right?  I'll follow up on that one.

Thanks.

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