Date: Wed, 22 Apr 2009 07:27:03 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 160926 for review Message-ID: <200904220727.n3M7R3YQ093176@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=160926 Change 160926 by zec@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904220727.n3M7R3YQ093176>