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: <20110822132713.GT2203@ZenIV.linux.org.uk>
Date:	Mon, 22 Aug 2011 14:27:14 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Josh Boyer <jwboyer@...il.com>
Cc:	"Justin P. Mattock" <justinmattock@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: INFO: possible circular locking dependency detected
 3.1.0-rc2-00190-g3210d19

On Mon, Aug 22, 2011 at 02:16:21PM +0100, Al Viro wrote:
> On Mon, Aug 22, 2011 at 09:09:14AM -0400, Josh Boyer wrote:
> 
> > We've had a report of this on 3.0.1 as well.  Slightly different
> > scenario and fs, but the locks in question are the same.
> > https://bugzilla.redhat.com/show_bug.cgi?id=730998
> > 
> > It seems that with CONFIG_PROVE_LOCKING on, might_fault will always
> > attempt to grab mm->mmap_sem.  The common flow here is that getdents
> > calls filldir, which calls copy_to_user, which is what is calling
> > might_fault.
> > 
> > Beyond that, I'm a bit over my head at the moment because I don't know
> > if the VFS is right and we just need some more lockdep annotations or
> > if there really is a problem.
> 
> Don't grab ->i_mutex in ->evict_inode().  Why are you doing that, anyway?

Note, BTW, that readdir() is a red herring here; there is a much more
relevant reason for that ranking.  Namely, write() doing copy_from_user()
when the file we are writing into has i_mutex held by us.  That can fault
and in this case we have a non-directory inode.  While you can't have
directory mmapped, regular files can be mmapped just fine.
--
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