svn commit: r298545 - projects/vnet/sys/net
Bjoern A. Zeeb
bz at FreeBSD.org
Sun Apr 24 16:07:51 UTC 2016
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) \
More information about the svn-src-projects
mailing list