Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F165558978
D19604.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
921 B
Referenced Files
None
Subscribers
None
D19604.diff
View Options
Index: head/sys/net/iflib.c
===================================================================
--- head/sys/net/iflib.c
+++ head/sys/net/iflib.c
@@ -4662,10 +4662,10 @@
* XXX sanity check that ntxd & nrxd are a power of 2
*/
iflib_reset_qvalues(ctx);
-
+ CTX_LOCK(ctx);
if ((err = IFDI_ATTACH_PRE(ctx)) != 0) {
device_printf(dev, "IFDI_ATTACH_PRE failed %d\n", err);
- goto fail_ctx_free;
+ goto fail_unlock;
}
if (sctx->isc_flags & IFLIB_GEN_MAC)
iflib_gen_mac(ctx);
@@ -4819,6 +4819,7 @@
if_setgetcounterfn(ctx->ifc_ifp, iflib_if_get_counter);
iflib_add_device_sysctl_post(ctx);
ctx->ifc_flags |= IFC_INIT_DONE;
+ CTX_UNLOCK(ctx);
return (0);
fail_detach:
ether_ifdetach(ctx->ifc_ifp);
@@ -4827,6 +4828,8 @@
iflib_rx_structures_free(ctx);
fail_iflib_detach:
IFDI_DETACH(ctx);
+fail_unlock:
+ CTX_UNLOCK(ctx);
fail_ctx_free:
free(ctx->ifc_softc, M_IFLIB);
free(ctx, M_IFLIB);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 9, 4:21 PM (2 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36344625
Default Alt Text
D19604.diff (921 B)
Attached To
Mode
D19604: iflib: hold the CTX lock in iflib_pseudo_register
Attached
Detach File
Event Timeline
Log In to Comment