Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162941235
D56288.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
598 B
Referenced Files
None
Subscribers
None
D56288.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D56288: ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of ifnet_detach_sxlock
Attached
Detach File
Event Timeline
Log In to Comment