Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2002 10:53:47 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 20056 for review
Message-ID:  <200210241753.g9OHrlMq015866@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=20056

Change 20056 by rwatson@rwatson_tislabs on 2002/10/24 10:53:26

	During the root mount, it's possible for a NULL mountpoint
	to be passed to getnewvnode() to support the device vnode
	we're mounting on.  For now, just skip setting the
	label on these vnodes, and generate a printf to make sure
	our understanding of this scenario is correct.  In the
	future, we might want to add a KASSERT that the type of
	the vnode is "none", or special case the handling here
	a bit further.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/vfs_subr.c#45 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/vfs_subr.c#45 (text+ko) ====

@@ -1004,9 +1004,14 @@
 	VI_UNLOCK(vp);
 #ifdef MAC
 	mac_init_vnode(vp);
-	if ((mp->mnt_flag & MNT_MULTILABEL) == 0) {
+	/*
+	 * NULL mp indicates that this vnode is being used for the
+	 * mount device for the root file system.
+	 */
+	if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0) {
 		mac_associate_vnode_singlelabel(mp, vp);
-	}
+	} else if (mp == NULL)
+		printf("NULL mp in getnewvnode()\n");
 #endif
 	insmntque(vp, mp);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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