Page MenuHomeFreeBSD

iflib: cleanup memory leaks on driver detach
ClosedPublic

Authored by jacob.e.keller_intel.com on Oct 25 2019, 11:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 2:38 AM
Unknown Object (File)
Jan 26 2024, 10:18 PM
Unknown Object (File)
Dec 23 2023, 12:02 AM
Unknown Object (File)
Dec 10 2023, 9:48 PM
Unknown Object (File)
Nov 12 2023, 8:23 AM
Unknown Object (File)
Sep 22 2023, 5:06 AM
Unknown Object (File)
Sep 6 2023, 2:55 AM
Unknown Object (File)
Sep 5 2023, 11:12 AM
Subscribers

Details

Summary

The iflib stack failed to release all of the memory allocated under
M_IFLIB during device detach.

Specifically, the ifmp_ring, the ift_ifdi Tx DMA info, and the ifr_ifdi Rx
DMA info were not being released.

Release this memory so that iflib won't leak memory when a device
detaches.

Since we're freeing the ift_ifdi pointer during iflib_txq_destroy we
need to call this only after iflib_dma_free in iflib_tx_structures_free.

Additionally, also ensure that we destroy the callout mutex associated
with each Tx queue when we free it.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27229
Build 25493: arc lint + arc unit

Event Timeline

We should be able to MFC this to 12-STABLE and 11-STABLE. Since the issue has existed since the beginning of iflib in-tree, I don't really think it's worth trying to rush it into 12.1... although it is a relatively small fix.

This revision is now accepted and ready to land.Oct 25 2019, 11:37 PM
This revision was automatically updated to reflect the committed changes.