Re: races in ll_splice_alias() and elsewhere (ext4, ocfs2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 10, 2016, at 12:15 AM, Al Viro wrote:

> PS: there's a reason why e.g. NFS ->d_revalidate() is doing
>        if (flags & LOOKUP_RCU) {
>                parent = ACCESS_ONCE(dentry->d_parent);
>                dir = d_inode_rcu(parent);
>                if (!dir)
>                        return -ECHILD;
>        } else {
>                parent = dget_parent(dentry);
>                dir = d_inode(parent);
>        }  
> and so do other instances.  It does *not* guarantee that parent will remain
> the parent through the whole thing (or will still be one by the time
> dget_parent() caller gets the return value), but it does guarantee that it
> won't get freed under you.  Note that the original parent won't disappear
> (it's pinned by the caller), but there's no promise that what you'll
> fetch from dentry->d_parent inside the method will have anything to do with
> that.
> 
> BTW, we might be better off if we passed the parent and child as separate
> arguments…

I wonder if this is something you are seriously contemplating doing or should
I still future-proof Lustre a bit and get a patch going to use dget_parent/dput
in ll_revalidate_dentry in Lustre?
While it's not a problem now due to the external locking, that might change
in the future--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux