From owner-p4-projects Thu Oct 24 10:54:35 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 64C8737B404; Thu, 24 Oct 2002 10:54:33 -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 EDD7D37B401 for ; Thu, 24 Oct 2002 10:54:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F0E043E77 for ; Thu, 24 Oct 2002 10:54:32 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9OHrlmV015869 for ; Thu, 24 Oct 2002 10:53:47 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9OHrlMq015866 for perforce@freebsd.org; Thu, 24 Oct 2002 10:53:47 -0700 (PDT) Date: Thu, 24 Oct 2002 10:53:47 -0700 (PDT) Message-Id: <200210241753.g9OHrlMq015866@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 20056 for review To: Perforce Change Reviews 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 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