From owner-p4-projects@FreeBSD.ORG Tue Dec 23 13:06:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 497631065676; Tue, 23 Dec 2008 13:06:34 +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 0D2241065674 for ; Tue, 23 Dec 2008 13:06:34 +0000 (UTC) (envelope-from zec@freebsd.org) Received: from labs4.cc.fer.hr (labs4.cc.fer.hr [161.53.72.24]) by mx1.freebsd.org (Postfix) with ESMTP id 925578FC21 for ; Tue, 23 Dec 2008 13:06:33 +0000 (UTC) (envelope-from zec@freebsd.org) Received: from sluga.fer.hr (sluga.cc.fer.hr [161.53.72.14]) by labs4.cc.fer.hr (8.14.2/8.14.2) with ESMTP id mBNCnhQ5029707; Tue, 23 Dec 2008 13:49:43 +0100 (CET) Received: from [192.168.200.110] ([161.53.19.79]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Dec 2008 13:49:10 +0100 From: Marko Zec To: "Bjoern A. Zeeb" Date: Tue, 23 Dec 2008 13:49:07 +0100 User-Agent: KMail/1.9.7 References: <200812230943.mBN9hbEZ048678@repoman.freebsd.org> <20081223115423.W97918@maildrop.int.zabbadoz.net> In-Reply-To: <20081223115423.W97918@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812231349.07820.zec@freebsd.org> X-OriginalArrivalTime: 23 Dec 2008 12:49:10.0906 (UTC) FILETIME=[DA04E5A0:01C964FC] X-Scanned-By: MIMEDefang 2.64 on 161.53.72.24 Cc: Perforce Change Reviews Subject: Re: PERFORCE change 155159 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: Tue, 23 Dec 2008 13:06:34 -0000 On Tuesday 23 December 2008 13:05:26 Bjoern A. Zeeb wrote: > On Tue, 23 Dec 2008, Marko Zec wrote: > > http://perforce.freebsd.org/chv.cgi?CH=155159 > > > > Change 155159 by zec@zec_tca51 on 2008/12/23 09:42:41 > > > > Misintegration - unbreak options VIMAGE_GLOBALS build. > > > > Affected files ... > > > > .. //depot/projects/vimage/src/sys/net/if.c#60 edit > > > > Differences ... > > > > ==== //depot/projects/vimage/src/sys/net/if.c#60 (text+ko) ==== > > > > @@ -402,10 +402,6 @@ > > { > > INIT_VNET_NET(curvnet); > > > > -#ifndef VIMAGE > > - vnet_mod_register(&vnet_net_modinfo); > > -#endif > > - > > V_if_index = 0; > > V_ifindex_table = NULL; > > V_if_indexlim = 8; > > This is sounds wrong as well. > > In case of VIMAGE vnet_mod_register is called in if_init(). > Then vnet_net_iattach will be called as well from > vnet_mod_constructor() and thus we are going to call > vnet_mod_register() twice resulting in a panic. See p4 describe -du > 154705 . > > So the proper check would be.. ? > > #if !defined(VIMAGE_GLOBALS) && !defined(VIMAGE) Yes, or to perhaps a in a slightly simpler form, I think the correct way of calling the initializer fn and / or registering the vnet module should be #ifdef VIMAGE_GLOBALS vnet_inet_iattach(NULL) #else vnet_mod_register(&vnet_net_modinfo); #endif in this case in if_init(), definitely not in vnet_net_iattach() Good point, I think I should revisit all the vnet module registrations in the vimage branch now, as well as possibly put in some #ifdefs inside vnet_mod_register()... Thanks, Marko > Three tries, must be right now;-)