From owner-p4-projects@FreeBSD.ORG Wed Apr 22 07:27:04 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 86D151065677; Wed, 22 Apr 2009 07:27:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4781D106566B for ; Wed, 22 Apr 2009 07:27:04 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 362AF8FC12 for ; Wed, 22 Apr 2009 07:27:04 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n3M7R4bH093248 for ; Wed, 22 Apr 2009 07:27:04 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n3M7R3YQ093176 for perforce@freebsd.org; Wed, 22 Apr 2009 07:27:03 GMT (envelope-from zec@fer.hr) Date: Wed, 22 Apr 2009 07:27:03 GMT Message-Id: <200904220727.n3M7R3YQ093176@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 160926 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2009 07:27:05 -0000 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