Page MenuHomeFreeBSD

D19604.diff
No OneTemporary

D19604.diff

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

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)

Event Timeline