DragonFlyBSD Kernel Audit
DF-0100 / fix.diff
← back to finding ↓ download raw
diff --git a/kern/vfs_conf.c b/kern/vfs_conf.c
--- a/kern/vfs_conf.c
+++ b/kern/vfs_conf.c
@@ -298,6 +298,10 @@
 	}
 
 	vfsp = vfsconf_find_by_name("devfs");
+	if (vfsp == NULL) {
+		kprintf("vfs_mountroot_devfs: devfs not registered\n");
+		return (ENODEV);
+	}
 
 	/*
 	 * Allocate and initialize the filesystem.