[Bug 223348] Inode number for directories change to inode number of directory two levels up causing hierarchy loop

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Nov 1 07:53:51 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223348

Andriy Gapon <avg at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjg at FreeBSD.org

--- Comment #3 from Andriy Gapon <avg at FreeBSD.org> ---
And when you know what you are looking for:

static __noinline int
cache_lookup_nomakeentry(struct vnode *dvp, struct vnode **vpp,
    struct componentname *cnp, struct timespec *tsp, int *ticksp)
{
        struct namecache *ncp;
        struct rwlock *blp;
        struct mtx *dvlp, *dvlp2;
        uint32_t hash;
        int error;

        if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') {

There is a similar condition in cache_lookup() as well.

I do not see any code to pre-check that cnp->cn_nameptr[0] == '.'

Seems like bad refactoring in r324378.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list