Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2008 15:17:36 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 143700 for review
Message-ID:  <200806181517.m5IFHa2K063766@repoman.freebsd.org>

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

Change 143700 by zec@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);



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