Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2008 06:03:00 GMT
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 143747 for review
Message-ID:  <200806190603.m5J630Rf030183@repoman.freebsd.org>

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

Change 143747 by julian@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);



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