Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Apr 2016 16:07:50 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r298545 - projects/vnet/sys/net
Message-ID:  <201604241607.u3OG7oio068153@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sun Apr 24 16:07:50 2016
New Revision: 298545
URL: https://svnweb.freebsd.org/changeset/base/298545

Log:
  Move counters to SI_SUB_INIT_IF;  cannot free them before all protcols
  and interfaces are gone as otherwise we will try to update them and
  modified freed memory.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/vnet/sys/net/vnet.h

Modified: projects/vnet/sys/net/vnet.h
==============================================================================
--- projects/vnet/sys/net/vnet.h	Sun Apr 24 16:05:09 2016	(r298544)
+++ projects/vnet/sys/net/vnet.h	Sun Apr 24 16:07:50 2016	(r298545)
@@ -111,8 +111,8 @@ vnet_##name##_init(const void *unused)	\
 {					\
 	VNET_PCPUSTAT_ALLOC(name, M_WAITOK);	\
 }					\
-VNET_SYSINIT(vnet_ ## name ## _init, SI_SUB_PROTO_IFATTACHDOMAIN,	\
-    SI_ORDER_ANY, vnet_ ## name ## _init, NULL)
+VNET_SYSINIT(vnet_ ## name ## _init, SI_SUB_INIT_IF,			\
+    SI_ORDER_FIRST, vnet_ ## name ## _init, NULL)
 
 #define	VNET_PCPUSTAT_SYSUNINIT(name)					\
 static void								\
@@ -120,8 +120,8 @@ vnet_##name##_uninit(const void *unused)
 {									\
 	VNET_PCPUSTAT_FREE(name);					\
 }									\
-VNET_SYSUNINIT(vnet_ ## name ## _uninit, SI_SUB_PROTO_IFATTACHDOMAIN,	\
-    SI_ORDER_ANY, vnet_ ## name ## _uninit, NULL)
+VNET_SYSUNINIT(vnet_ ## name ## _uninit, SI_SUB_INIT_IF,		\
+    SI_ORDER_FIRST, vnet_ ## name ## _uninit, NULL)
 
 #ifdef SYSCTL_OID
 #define	SYSCTL_VNET_PCPUSTAT(parent, nbr, name, type, array, desc)	\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604241607.u3OG7oio068153>