Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2006 17:59:29 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 111033 for review
Message-ID:  <200612041759.kB4HxTt3081535@repoman.freebsd.org>

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

Change 111033 by millert@millert_g5tower on 2006/12/04 17:59:04

	Be sure to label aliased vnodes too.
	
	The vnode created by bdevvp() has no label and when
	checkalias() in vnode_create() returns that vnode for devfs
	to use, we failed to call mac_vnode_label_associate_singlelabel()

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#9 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#9 (text+ko) ====

@@ -3678,15 +3678,14 @@
 			if (param->vnfs_mp) {
 					if (param->vnfs_mp->mnt_kern_flag & MNTK_LOCK_LOCAL)
 						vp->v_flag |= VLOCKLOCAL;
-			        if (insert) {
 #ifdef MAC
-					if ((vfs_flags(param->vnfs_mp) & MNT_MULTILABEL) == 0) {
-						/* No locks or references needed */
-						mac_vnode_label_associate_singlelabel(param->vnfs_mp, vp);
-						vp->v_lflag |= VL_LABELED;
-					}
+				if ((vfs_flags(param->vnfs_mp) & MNT_MULTILABEL) == 0) {
+					/* No locks or references needed */
+					mac_vnode_label_associate_singlelabel(param->vnfs_mp, vp);
+					vp->v_lflag |= VL_LABELED;
+				}
 #endif
-
+			        if (insert) {
 				        /*
 					 * enter in mount vnode list
 					 */



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