Page MenuHomeFreeBSD

D15299.id42275.diff
No OneTemporary

D15299.id42275.diff

Index: head/sys/net/iflib.c
===================================================================
--- head/sys/net/iflib.c
+++ head/sys/net/iflib.c
@@ -4453,7 +4453,8 @@
if (scctx->isc_intr == IFLIB_INTR_MSIX || scctx->isc_intr == IFLIB_INTR_MSI)
pci_release_msi(ctx->ifc_dev);
fail_queues:
- /* XXX free queues */
+ iflib_tx_structures_free(ctx);
+ iflib_rx_structures_free(ctx);
fail:
IFDI_DETACH(ctx);
CTX_UNLOCK(ctx);
@@ -5065,14 +5066,16 @@
{
int err;
+ /*
+ * It is expected that the caller takes care of freeing queues if this
+ * fails.
+ */
if ((err = iflib_tx_structures_setup(ctx)) != 0)
return (err);
- if ((err = iflib_rx_structures_setup(ctx)) != 0) {
+ if ((err = iflib_rx_structures_setup(ctx)) != 0)
device_printf(ctx->ifc_dev, "iflib_rx_structures_setup failed: %d\n", err);
- iflib_tx_structures_free(ctx);
- iflib_rx_structures_free(ctx);
- }
+
return (err);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 5:53 AM (15 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30822160
Default Alt Text
D15299.id42275.diff (915 B)

Event Timeline