PERFORCE change 20056 for review

Nate Lawson nate at root.org
Thu Oct 24 18:00:31 GMT 2002


On Thu, 24 Oct 2002, Robert Watson wrote:
> http://perforce.freebsd.org/chv.cgi?CH=20056
> 
> Change 20056 by rwatson at 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.

I hope you don't mean strcmp(vp->v_tag, "none") and instead mean
vp->v_type & VNON.

-Nate
 
> 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list