Re: [PATCH] proc_sysctl: Fix up ->is_seen() handling

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

 



On Fri, Jun 13, 2025 at 12:37:33PM +1000, NeilBrown wrote:

> If two threads in the same namespace look up the same name at the same
> time (which previously didn't exist), they will both enter
> d_alloc_parallel() where neither will notice the other, so both will
> create and install d_in_lookup() dentries, and then both will call
> ->lookup, creating two identical inodes.
> 
> I suspect that isn't fatal, but it does seem odd.
> 
> Maybe proc_sys_compare should return 0 for d_in_lookup() (aka !inode)
> dentries, and then proc_sys_revalidate() can perform the is_seen test
> and return -EAGAIN if needed, and __lookup_slow() and others could
> interpret that as meaning to "goto again" without calling
> d_invalidate().

Umm...  Not sure it's the best solution; let me think a bit.  Just need
to finish going through the ported rpc_pipefs series for the final look
and posting it; should be about half an hour or so...




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

  Powered by Linux