From owner-svn-src-head@FreeBSD.ORG Fri Aug 21 09:22:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17201065697; Fri, 21 Aug 2009 09:22:32 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0B158FC83; Fri, 21 Aug 2009 09:22:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7L9MW12017083; Fri, 21 Aug 2009 09:22:32 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7L9MWje017082; Fri, 21 Aug 2009 09:22:32 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200908210922.n7L9MWje017082@svn.freebsd.org> From: Julian Elischer Date: Fri, 21 Aug 2009 09:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196419 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2009 09:22:32 -0000 Author: julian Date: Fri Aug 21 09:22:32 2009 New Revision: 196419 URL: http://svn.freebsd.org/changeset/base/196419 Log: Don't allow access to the internals until it has all been set up. Specifically, not until the per-vnet parts have been set up. Submitted by: kmacy@ Reviewed by: julian@, zec@ Approved by: re(rwatson) MFC after: immediately Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Fri Aug 21 03:14:39 2009 (r196418) +++ head/sys/net/flowtable.c Fri Aug 21 09:22:32 2009 (r196419) @@ -999,6 +999,7 @@ flowtable_init_vnet(const void *unused _ NULL, NULL, NULL, NULL, 64, UMA_ZONE_MAXBUCKET); uma_zone_set_max(V_flow_ipv4_zone, V_flowtable_nmbflows); uma_zone_set_max(V_flow_ipv6_zone, V_flowtable_nmbflows); + V_flowtable_ready = 1; } VNET_SYSINIT(flowtable_init_vnet, SI_SUB_KTHREAD_INIT, SI_ORDER_MIDDLE, flowtable_init_vnet, NULL); @@ -1011,7 +1012,6 @@ flowtable_init(const void *unused __unus mtx_init(&flowclean_lock, "flowclean lock", NULL, MTX_DEF); EVENTHANDLER_REGISTER(ifnet_departure_event, flowtable_flush, NULL, EVENTHANDLER_PRI_ANY); - V_flowtable_ready = 1; } SYSINIT(flowtable_init, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, flowtable_init, NULL); @@ -1022,6 +1022,7 @@ static void flowtable_uninit(const void *unused __unused) { + V_flowtable_ready = 0; uma_zdestroy(V_flow_ipv4_zone); uma_zdestroy(V_flow_ipv6_zone); }