Re: [PATCH] vfs: fix race in rcu lookup of pruned dentry

From: Al Viro
Date: Tue Jul 19 2011 - 20:04:29 EST


On Tue, Jul 19, 2011 at 04:56:51PM -0700, Linus Torvalds wrote:
> On Tue, Jul 19, 2011 at 4:45 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > You know what... ?I doubt that you want to mess with ->d_seq checks here.
>
> I'm ok with doing just the "move *inode setting" patch.
>
> And if we really don't even allow renames of those mounted things, I
> guess the sequence number isn't required.

See vfs_rename_{dir,other}:

error = -EBUSY;
if (d_mountpoint(old_dentry) || d_mountpoint(new_dentry))
goto out;

in both, before even trying to call the method. Traditional on all
Unices I've ever seen...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/