Page MenuHomeFreeBSD

D56288.id175015.diff
No OneTemporary

D56288.id175015.diff

diff --git a/sys/net/if.c b/sys/net/if.c
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -471,6 +471,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
@@ -499,9 +501,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
Mon, Oct 5, 7:41 PM (14 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40256526
Default Alt Text
D56288.id175015.diff (598 B)

Event Timeline