From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric Van Hensbergen <ericvh@gmail.com>,
V9FS Developers <v9fs-developer@lists.sourceforge.net>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] 9p file system bug fixes for 2.6.35-rc2
Date: Mon, 7 Jun 2010 17:48:54 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1006071746150.4506@i5.linux-foundation.org> (raw)
In-Reply-To: <20100608004102.GQ31073@ZenIV.linux.org.uk>
On Tue, 8 Jun 2010, Al Viro wrote:
> On Mon, Jun 07, 2010 at 05:08:19PM -0700, Linus Torvalds wrote:
>
> > In fact, the other thing that I find doing that whole "dentry->d_parent"
> > thing seems to literally be broken. If you look at v9fs_fid_lookup(),
> > you'll notice how it walks up the d_parent chain, and at that point you do
> > NOT own the directory i_mutex, so at that point d_parent really _can_ be
> > changing wildly due to concurrent renames or whatever.
>
> Eh... It's bogus, all right, but i_mutex is not the correct solution.
Oh, no, I didn't imply it was. But the other sites that I saw doing
the dentry->d_parent access already _had_ the i_mutex thing, so I was
pointing out how this one does not (and indeed _cannot_ do that).
So I'm just saying that pretty much _all_ the dentry->d_parent use in 9p
seems very suspect. The cases where we hold i_mutex (because the caller
already took it) shouldn't do that whole d_parent dance, because they get
the directory inode passed into them directly.
And the other places are just buggy.
So from a quick look, the use of d_parent in 9p is simply not a good idea.
Linus
next prev parent reply other threads:[~2010-06-08 0:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 20:02 [GIT PULL] 9p file system bug fixes for 2.6.35-rc2 Eric Van Hensbergen
2010-06-08 0:08 ` Linus Torvalds
2010-06-08 0:41 ` Al Viro
2010-06-08 0:48 ` Linus Torvalds [this message]
2010-06-16 16:42 ` [V9fs-developer] " Aneesh Kumar K. V
2010-06-24 16:30 ` Aneesh Kumar K. V
2010-06-29 20:18 ` Eric Van Hensbergen
2010-06-29 20:38 ` Linus Torvalds
2010-06-30 11:52 ` Aneesh Kumar K. V
2010-06-30 16:48 ` Linus Torvalds
2010-06-30 18:58 ` Aneesh Kumar K. V
2010-06-30 18:16 ` Latchesar Ionkov
2010-06-30 18:31 ` Linus Torvalds
2010-06-30 18:33 ` Aneesh Kumar K. V
2010-06-30 12:55 ` Aneesh Kumar K. V
2010-06-08 14:29 ` Venkateswararao Jujjuri (JV)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1006071746150.4506@i5.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).