Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145605730
D22783.1778286959.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22783.1778286959.diff
View Options
Index: sys/net/if.c
===================================================================
--- sys/net/if.c
+++ sys/net/if.c
@@ -477,7 +477,11 @@
if_vmove(ifp, ifp->if_home_vnet);
}
}
-VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_ANY,
+/*
+ * Dropped to just after SI_ORDER_ANY so that vnet_shutdown can be properly
+ * initiated in other SYSUNINITs before we proceed to tear down interfaces.
+ */
+VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_MIDDLE,
vnet_if_return, NULL);
#endif
@@ -1077,11 +1081,7 @@
struct domain *dp;
struct ifnet *iter;
int found = 0;
-#ifdef VIMAGE
- bool shutdown;
- shutdown = ifp->if_vnet->vnet_shutdown;
-#endif
IFNET_WLOCK();
CK_STAILQ_FOREACH(iter, &V_ifnet, if_link)
if (iter == ifp) {
@@ -1151,7 +1151,7 @@
* On VNET shutdown abort here as the stack teardown will do all
* the work top-down for us.
*/
- if (shutdown) {
+ if (ifp->if_vnet->vnet_shutdown) {
/* Give interface users the chance to clean up. */
EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
Index: sys/net/vnet.c
===================================================================
--- sys/net/vnet.c
+++ sys/net/vnet.c
@@ -357,7 +357,7 @@
/* Signal that VNET is being shutdown. */
curvnet->vnet_shutdown = 1;
}
-VNET_SYSUNINIT(vnet_sysuninit_shutdown, SI_SUB_VNET_DONE, SI_ORDER_FIRST,
+VNET_SYSUNINIT(vnet_sysuninit_shutdown, SI_SUB_VNET_DONE, SI_ORDER_ANY,
vnet_sysuninit_shutdown, NULL);
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 9, 12:35 AM (15 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28610714
Default Alt Text
D22783.1778286959.diff (1 KB)
Attached To
Mode
D22783: if_detach_internal: defer reading of vnet_shutdown until needed
Attached
Detach File
Event Timeline
Log In to Comment