Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2014 14:20:31 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269187 - head/sys/fs/nullfs
Message-ID:  <201407281420.s6SEKVqC084514@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Jul 28 14:20:31 2014
New Revision: 269187
URL: http://svnweb.freebsd.org/changeset/base/269187

Log:
  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

Modified:
  head/sys/fs/nullfs/null_vnops.c

Modified: head/sys/fs/nullfs/null_vnops.c
==============================================================================
--- head/sys/fs/nullfs/null_vnops.c	Mon Jul 28 14:15:41 2014	(r269186)
+++ head/sys/fs/nullfs/null_vnops.c	Mon Jul 28 14:20:31 2014	(r269187)
@@ -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) &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407281420.s6SEKVqC084514>