[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100109023035.GH30528@ZenIV.linux.org.uk>
Date: Sat, 9 Jan 2010 02:30:35 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Trond Myklebust <Trond.Myklebust@...app.com>,
Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
linux-nfs@...r.kernel.org
Subject: Re: [RFC PATCH 0/2] Fix up the NFS mmap code
On Fri, Jan 08, 2010 at 06:22:01PM -0800, Linus Torvalds wrote:
>
>
> On Sat, 9 Jan 2010, Al Viro wrote:
> >
> > Well, sure - it steps on i_mutex-before-mmmap_sem first from ls somewhere and
> > records the ordering for posterity. Then NFS steps into mmap() (on a
> > different inode) and gets conflicting ordering.
>
> Look closer: the inodes for directories and for non-directories have
> i_mutex in different lockdep classes.
>
> So that "on a different inode" thing should have made it a non-issue,
> since there is no actual chain back. There is "mmap_sem ->
> i_mutex_regular_file" (for mmap) and there is "i_mutex_directory ->
> mmap_sem" (for filldir), but that isn't an ABBA.
>
> The problem _seems_ to be (if I read Andi's chain correctly) that a
> directory hasn't gone through the i_mutex_dir_key change, so filldir ends
> up being counted against the default i_mutex_key.
Interesting... There's nfs_update_inode(), but it ought to scream bloody
murder on the type change (and its return value is ignore by nfs_fhget(),
BTW).
--
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