Re: [PATCH v5 5/6] net/nfb: release allocated resources correctly

Stephen Hemminger
2026-02-10T00:52:44Z

On Mon, 2 Feb 2026 20:33:29 +0100
spinler@cesnet.cz wrote:

> From: Martin Spinler <spinler@cesnet.cz>
>
> Internal handles are initialized in eth_dev_init, so the cleanup
> should be done in eth_dev_uninit.
>
> Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver")
> Cc: stable@dpdk.org
>
> Signed-off-by: Martin Spinler <spinler@cesnet.cz>
> ---

More AI review feedback. Will leave up to you to fix

Patch 29: net/nfb: release allocated resources correctly
Potential uninitialized access in error path

The patch adds err_ts_register: error label that calls
nfb_eth_dev_uninit(dev). This function accesses internals->rxmac,
internals->txmac, and internals->nfb. If timestamp registration fails,
these fields should all be initialized (since the error is late in the
configure flow), but this should be verified. The rxmac/txmac are
initialized in nfb_eth_dev_init() before this error can occur, so this
appears safe. However, calling uninit from configure is unusual -
typically configure errors would not tear down the entire device.
Recommendation: Verify that all error paths properly clean up only what
was allocated in that specific function, rather than calling the full
uninit.