lkml.org 
[lkml]   [2010]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] 9p file system bug fixes for 2.6.35-rc2


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


\
 
 \ /
  Last update: 2010-06-08 02:51    [W:0.080 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site