PERFORCE change 160926 for review
Marko Zec
zec at FreeBSD.org
Wed Apr 22 07:27:05 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=160926
Change 160926 by zec at zec_amdx2 on 2009/04/22 07:26:35
Attempt to fix a panic in nd6_slowtimo() due to
INIT_VNET_INET() being called with NULL as an argument -
should be curvnet passed as an void *arg to callout handler.
Affected files ...
.. //depot/projects/vimage-commit2/src/sys/netinet6/nd6.c#28 edit
.. //depot/projects/vimage-commit2/src/sys/sys/vimage.h#41 edit
Differences ...
==== //depot/projects/vimage-commit2/src/sys/netinet6/nd6.c#28 (text+ko) ====
@@ -191,7 +191,7 @@
/* start timer */
callout_init(&V_nd6_slowtimo_ch, 0);
callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
- nd6_slowtimo, NULL);
+ nd6_slowtimo, curvnet);
nd6_init_done = 1;
@@ -1665,7 +1665,7 @@
struct ifnet *ifp;
callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
- nd6_slowtimo, NULL);
+ nd6_slowtimo, curvnet);
IFNET_RLOCK();
for (ifp = TAILQ_FIRST(&V_ifnet); ifp;
ifp = TAILQ_NEXT(ifp, if_list)) {
==== //depot/projects/vimage-commit2/src/sys/sys/vimage.h#41 (text+ko) ====
@@ -155,8 +155,12 @@
LIST_ENTRY(vnet) vnet_le; /* all vnets list */
u_int vnet_magic_n;
};
+#endif
-extern struct vnet *curvnet;
+#ifdef VIMAGE
+extern struct vnet *curvnet; /* XXX will become thread-local soon */
+#else
+#define curvnet NULL
#endif
#ifdef VIMAGE
@@ -185,11 +189,7 @@
#define VNET_FOREACH(arg)
#endif
-#ifdef VIMAGE
#define TD_TO_VNET(td) curvnet
-#else
-#define TD_TO_VNET(td)
-#endif
/* Non-VIMAGE null-macros */
#define IS_DEFAULT_VNET(arg) 1
More information about the p4-projects
mailing list