Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2006 16:11:40 GMT
From:      Todd Miller <millert@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 109935 for review
Message-ID:  <200611141611.kAEGBeoF073253@repoman.freebsd.org>

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

Change 109935 by millert@millert_g5tower on 2006/11/14 16:11:20

	In vfs_mountroot() failure of VFS_ROOT() and vnode_label()
	should result in filesystem being unmounted.

Affected files ...

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

Differences ...

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

@@ -951,16 +951,24 @@
 
 			error = VFS_ROOT(mp, &vp, &context);
 			if (error) {
-				printf("%s() VFS_ROOT returned %d\n",
+				printf("%s() VFS_ROOT() returned %d\n",
 				    __func__, error);
-				return (error);
+				dounmount(mp, MNT_FORCE, context.vc_proc);
+				goto fail;
 			}
 
 			/* VFS_ROOT provides reference so flags = 0 */
 			error = vnode_label(mp, NULL, vp, NULL, 0, &context);
+			if (error) {
+				printf("%s() vnode_label() returned %d\n",
+				    __func__, error);
+				dounmount(mp, MNT_FORCE, context.vc_proc);
+				goto fail;
+			}
 #endif
-			return (error);
+			return (0);
 		}
+fail:
 		vfs_rootmountfailed(mp);
 		
 		if (error != EINVAL)



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