FAILED: Patch "octeontx2-af: CGX: fix bitmap leaks" failed to apply to 6.1-stable tree
Sasha Levin
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 3def995c4ede842adf509c410e92d09a0cedc965 Mon Sep 17 00:00:00 2001
From: Bo Sun <[email protected]>
Date: Fri, 6 Feb 2026 21:09:24 +0800
Subject: [PATCH] octeontx2-af: CGX: fix bitmap leaks
The RX/TX flow-control bitmaps (rx_fc_pfvf_bmap and tx_fc_pfvf_bmap) are allocated by cgx_lmac_init() but never freed in cgx_lmac_exit(). Unbinding and rebinding the driver therefore triggers kmemleak:
unreferenced object (size 16):
backtrace:
rvu_alloc_bitmap
cgx_probe
Free both bitmaps during teardown.
--- drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/cgx.c +2 -0
@@ -1823,6 +1823,8 @@ static int cgx_lmac_exit(struct cgx *cgx) cgx->mac_ops->mac_pause_frm_config (cgx, lmac->lmac_id, false);cgx_configure_interrupt (cgx, lmac, lmac->lmac_id, true);kfree (lmac->mac_to_index_bmap.bmap); +rvu_free_bitmap (&lmac->rx_fc_pfvf_bmap); +rvu_free_bitmap (&lmac->tx_fc_pfvf_bmap);kfree (lmac->name);kfree (lmac); }
Signature · 1 line
2.51.0