Re: Devlinks. Code. (Dcache abuse?)

Neil Brown (neilb@cse.unsw.edu.au)
Mon, 19 Nov 2001 15:02:40 +1100 (EST)


On Friday November 16, viro@math.psu.edu wrote:
>
>
> On Fri, 16 Nov 2001, Neil Brown wrote:
>
> > + if (!(nd->mnt->mnt_flags & MNT_NODEV)
> > + && dentry->d_inode
> > + && (dentry->d_inode->i_mode & S_ISVTX)) {
> > + dentry = devlink_find(dentry, link);
>
> You are breaking vfsmount refcounting. Badly.

I looked, and I cannot see it.
I never change the refcound on any vfsmount, nor to I make
or destroy any references to any vfsmount.
In this piece of code we don't even own a reference to "dentry" (the
caller does) so assigning over it isn't a problem either.

About the only thing that might be a bit odd here is that we change
nd->dentry a few lines later without changing nd->mnt. But the new
dentry is always in the same dentry tree (though it is in owned
by a different filesystem).

Would you care to give a few more details?

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/