The allocated resources should be properly released on error case,
otherwise kernel will print
ax0: Invalid mac address ax0: IFDI_ATTACH_PRE failed 22 device_attach: ax0 attach returned 22 pci0:1:0:0: Device leaked memory resources
Differential D34628
[PATCH] if_axgbe: properly release resource in error case ztong0001_gmail.com on Mar 21 2022, 8:59 PM. Authored by Tags None Referenced Files
Details The allocated resources should be properly released on error case, ax0: Invalid mac address ax0: IFDI_ATTACH_PRE failed 22 device_attach: ax0 attach returned 22 pci0:1:0:0: Device leaked memory resources
Diff Detail
Event TimelineComment Actions Dear Reviewers,
Comment Actions The patch is incomplete: we should also destroy the taskqueue created near the end of the function, and axgbe_alloc_channels() also performs some memory allocations that are not freed.
Comment Actions Hi Mark,
Comment Actions When uploading raw diffs, please be sure to include context (-U9999999) per https://wiki.freebsd.org/Phabricator#Create_a_Revision_via_Web_Interface .
Comment Actions Thank you, Mark! |