[PATCH net] net: stmmac: fix possible memory leak in stmmac_dvr_probe()

Leon Romanovsky leon at kernel.org
Wed Dec 7 01:13:24 PST 2022


On Wed, Dec 07, 2022 at 04:34:13PM +0800, Gaosheng Cui wrote:
> The bitmap_free() should be called to free priv->af_xdp_zc_qps
> when create_singlethread_workqueue() fails, otherwise there will
> be a memory leak, so we add the err path error_wq_init to fix it.
> 
> Fixes: bba2556efad6 ("net: stmmac: Enable RX via AF_XDP zero-copy")
> Signed-off-by: Gaosheng Cui <cuigaosheng1 at huawei.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro at nvidia.com>



More information about the linux-arm-kernel mailing list