Page MenuHomeFreeBSD

D56288.diff
No OneTemporary

D56288.diff

diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -479,6 +479,8 @@
i = 0;
+ /* The lock has already been aquired in vnet_destroy() */
+ sx_assert(&ifnet_detach_sxlock, SX_XLOCKED);
/*
* We need to protect our access to the V_ifnet tailq. Ordinarily we'd
* enter NET_EPOCH, but that's not possible, because if_vmove() calls
@@ -507,9 +509,7 @@
IFNET_WUNLOCK();
for (int j = 0; j < i; j++) {
- sx_xlock(&ifnet_detach_sxlock);
if_vmove(pending[j], pending[j]->if_home_vnet);
- sx_xunlock(&ifnet_detach_sxlock);
}
free(pending, M_IFNET);

File Metadata

Mime Type
text/plain
Expires
Sun, Jul 19, 1:06 PM (4 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35234762
Default Alt Text
D56288.diff (598 B)

Event Timeline