diff options
author | kib <kib@FreeBSD.org> | 2014-07-28 14:20:31 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-07-28 14:20:31 +0000 |
commit | 617cdeea47fa8fd27b70b73bc6551f841c5dcedd (patch) | |
tree | 2dc9b0a19b57929306a5c78f9f60d81e6acc0189 /sys/fs/nullfs | |
parent | aa8e838945495a709753e3a187c297ce8de734f6 (diff) | |
download | FreeBSD-src-617cdeea47fa8fd27b70b73bc6551f841c5dcedd.zip FreeBSD-src-617cdeea47fa8fd27b70b73bc6551f841c5dcedd.tar.gz |
Assert that nullfs vnode has VV_ROOT set whenever lower vnode has.
Assert that dotdot lookup on the root vnode is not performed.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r-- | sys/fs/nullfs/null_vnops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index b8b9e0d..481644c 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -372,6 +372,10 @@ null_lookup(struct vop_lookup_args *ap) */ ldvp = NULLVPTOLOWERVP(dvp); vp = lvp = NULL; + KASSERT((ldvp->v_vflag & VV_ROOT) == 0 || + ((dvp->v_vflag & VV_ROOT) != 0 && (flags & ISDOTDOT) == 0), + ("ldvp %p fl %#x dvp %p fl %#x flags %#x", ldvp, ldvp->v_vflag, + dvp, dvp->v_vflag, flags)); error = VOP_LOOKUP(ldvp, &lvp, cnp); if (error == EJUSTRETURN && (flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && |