Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2002 11:00:31 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 20056 for review
Message-ID:  <Pine.BSF.4.21.0210241059530.68721-100000@root.org>
In-Reply-To: <200210241753.g9OHrlMq015866@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Oct 2002, Robert Watson wrote:
> 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.

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@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?Pine.BSF.4.21.0210241059530.68721-100000>