From owner-p4-projects Thu Oct 24 11: 0:39 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CFD0037B404; Thu, 24 Oct 2002 11:00:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F21837B401 for ; Thu, 24 Oct 2002 11:00:36 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id E28E243E91 for ; Thu, 24 Oct 2002 11:00:30 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 68988 invoked by uid 1000); 24 Oct 2002 18:00:31 -0000 Date: Thu, 24 Oct 2002 11:00:31 -0700 (PDT) From: Nate Lawson To: Robert Watson Cc: Perforce Change Reviews Subject: Re: PERFORCE change 20056 for review In-Reply-To: <200210241753.g9OHrlMq015866@repoman.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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