OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-316-gbcb468d

Gerrit Code Review gerrit@openafs.org
Wed, 10 Sep 2025 01:00:10 -0400


The following commit has been merged in the master branch:
commit bcb468db3b0a6b9597aa017b37c237ec78808870
Author: Cheyenne Wills <cwills@sinenomine.net>
Date:   Tue Aug 26 14:32:26 2025 -0600

    Linux: Restore using d_name.name in d_revalidate
    
    The commit:
        Linux-6.14: Handle dops.d_revalidate with parent (0306f3fdac736)
    updated afs_linux_dentry_revalidate to use the 'name' parameter that was
    introduced in Linux 6.14.  The change however is incorrectly using the
    'name' parameter (the name that the dentry is expected to have) by not
    using the qstr length of 'name'.  The original code had used dentry
    parameter's 'd_name.name' field as a NUL terminated string.
    
    Both the 'name' and 'd_name.name' are NUL terminated qstr (according to
    the porting documentation and existing Linux code usage).  However
    'name' can at times be a pointer to a longer path string where 'name'
    points to the leading part of that path, and the qstr length determines
    the length of the leading part. To properly use the 'name' parameter,
    the qstr length must be used instead of relying on the entire length of
    the NUL terminated string.
    
    Update afs_linux_dentry_revalidate to use the parent's dentry
    d_name.name field (restoring the way the dentry's name was obtained to
    what it was prior to the 0306f3fdac736 commit).
    
    Note: historically, openafs has been using the dentry d_name.name as
    a NUL terminated string from at least the initial git commit.  And
    within Linux, the dentry d_name.name has also been treated as a NUL
    terminated string (current as of 6.16 and going back to at least 2.6.18)
    
    It should be noted that the dentry d_name is unstable when d_revalidate
    is called.  A future commit will update the code to use a stable
    dentry d_name.
    
    This commit addresses a problem with excessive DNS queries that was
    reported to the openafs-info mailing list.  Initial analysis and
    identification of the mistake where done by <jaltman@auristor.com> and
    <marc@auristor.com>.
    Ref:  https://lists.openafs.org/pipermail/openafs-info/2025-August/043532.html
    
    Change-Id: I111b758af5580e827f460cbed736e6a8c33cf0e0
    Reviewed-on: https://gerrit.openafs.org/16527
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 src/afs/LINUX/osi_vnodeops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
OpenAFS Master Repository