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: <CA+5PVA65eUx36JMgbBoEKy9FwBzasBehc_OGqsThgns9=oGdLA@mail.gmail.com>
Date:	Mon, 22 Aug 2011 11:24:44 -0400
From:	Josh Boyer <jwboyer@...il.com>
To:	Al Viro <viro@...iv.linux.org.uk>
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 9:56 AM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Mon, Aug 22, 2011 at 09:33:34AM -0400, Josh Boyer wrote:
>
>> So the lockdep report in the RHBZ (which now that I look at it
>> probably isn't the same as this report) seems to be doing a readdir
>> while find is trying to mmap, which is calling into
>> hugetlbfs_file_mmap and throwing the same deadlock warning.  Is that
>> like the scenario you are describing above?
>
> Lockdep records the first trace that leads to locks taken in this
> order.  readdir() seems to be the first thing to step on i_mutex
> and mmap_sem (not too surprisingly, come to think of that - directory
> reads happening earlier in the boot than regular file writes).
>
> So when it reports i_mutex taken under mmap_sem, readdir gets mentioned
> by lockdep.  Often leading to comments along the lines of "but this
> inode is not a directory at all; shouldn't we relax the rules for
> non-directories?"  Nope; the same ordering very much applies to regular
> files.  With s/readdir/write/.
>
> The bottom line is: don't take i_mutex while holding mmap_sem.  Really.

OK, thanks.

It seems this particular hugetlbfs issue was reported a while ago here:

https://lkml.org/lkml/2011/4/15/272

I'll go poke that thread a bit.  That just leaves the ext4 evict case,
which hopefully Ted can answer.

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