Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2018 19:18:58 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342136 - head/sys/kern
Message-ID:  <201812151918.wBFJIwKH002481@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Sat Dec 15 19:18:58 2018
New Revision: 342136
URL: https://svnweb.freebsd.org/changeset/base/342136

Log:
  Clarify panic in set_rootvnode().
  Check for panic in vfs_mountroot_shuffle().
  
  Sponsored by: Netflix

Modified:
  head/sys/kern/vfs_mountroot.c

Modified: head/sys/kern/vfs_mountroot.c
==============================================================================
--- head/sys/kern/vfs_mountroot.c	Sat Dec 15 19:04:50 2018	(r342135)
+++ head/sys/kern/vfs_mountroot.c	Sat Dec 15 19:18:58 2018	(r342136)
@@ -211,7 +211,7 @@ set_rootvnode(void)
 	struct proc *p;
 
 	if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode))
-		panic("Cannot find root vnode");
+		panic("set_rootvnode: Cannot find root vnode");
 
 	VOP_UNLOCK(rootvnode, 0);
 
@@ -309,7 +309,8 @@ vfs_mountroot_shuffle(struct thread *td, struct mount 
 	if (mporoot != mpdevfs)
 		cache_purgevfs(mpdevfs, true);
 
-	VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot);
+	if (VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot))
+		panic("vfs_mountroot_shuffle: Cannot find root vnode");
 
 	VI_LOCK(vporoot);
 	vporoot->v_iflag &= ~VI_MOUNT;



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