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 10:37:58AM +1000, NeilBrown wrote:
> 
> Some sysctl tables can provide an is_seen() function which reports if
> the sysctl should be visible to the current process.  This is currently
> used to cause d_compare to fail for invisible sysctls.
> 
> This technique might have worked in 2.6.26 when it was implemented, but
> it cannot work now.  In particular if ->d_compare always fails for a
> particular name, then d_alloc_parallel() will always create a new dentry
> and pass it to lookup() resulting in a new inode for every lookup.  I
> tested this by changing sysctl_is_seen() to always return 0.  When
> all sysctls were still visible and repeated lookups (ls -li) reported
> different inode numbers.

What do you mean, "name"?




[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