PERFORCE change 143700 for review

Marko Zec zec at FreeBSD.org
Wed Jun 18 15:17:36 UTC 2008


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

Change 143700 by zec at zec_tpx32 on 2008/06/18 15:17:10

	Add comments.

Affected files ...

.. //depot/projects/vimage/src/sys/kern/kern_linker.c#15 edit

Differences ...

==== //depot/projects/vimage/src/sys/kern/kern_linker.c#15 (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