PERFORCE change 143747 for review

Julian Elischer julian at FreeBSD.org
Thu Jun 19 06:03:01 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=143747

Change 143747 by julian at julian_trafmon1 on 2008/06/19 06:02:07

	Some comments

Affected files ...

.. //depot/projects/vimage-devel/src/sys/kern/kern_linker.c#3 edit

Differences ...

==== //depot/projects/vimage-devel/src/sys/kern/kern_linker.c#3 (text+ko) ====

@@ -962,9 +962,14 @@
 		return (error);
 
 #ifdef VIMAGE
+	/* For now permit only the default vimage to kldload modules */
 	if (!IS_DEFAULT_VIMAGE(TD_TO_VIMAGE(td)))
 		return (EPERM);
 
+	/*
+	 * It's possible that kldloaded module will attach a new ifnet,
+	 * so vnet context must be set when this ocurs.
+	 */
 	CURVNET_SET(TD_TO_VNET(td));
 #endif
 
@@ -1297,6 +1302,10 @@
 			}
 		}
 #ifdef VIMAGE
+		/*
+		 * If symbol not found in global namespace, look up
+		 * for it in the current vnet.
+		 */
 		if (lf == NULL) {
 			CURVNET_SET(TD_TO_VNET(td));
 			error = vi_symlookup(&lookup, symstr);


More information about the p4-projects mailing list