From: Bo Sun <bo@mboxify.com>
To: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: kuba@kernel.org, pabeni@redhat.com, gakula@marvell.com,
sgoutham@marvell.com, sbhatta@marvell.com, hkelam@marvell.com,
horms@kernel.org, bbhushan2@marvell.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, sumang@marvell.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 2/2] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap()
Date: Mon, 09 Feb 2026 18:58:28 +0800 [thread overview]
Message-ID: <95dd319cf45cc5336bd66551157faa68@mboxify.com> (raw)
In-Reply-To: <68fb4b7c-0747-4e2f-bc52-ab2b3554abd0@linux.dev>
On 2026-02-07 20:19, Vadim Fedorenko wrote:
> On 06/02/2026 13:09, Bo Sun wrote:
>> mac_to_index_bmap is allocated with rvu_alloc_bitmap(), so free it
>> with rvu_free_bitmap() instead of open-coding kfree(.bmap) to keep
>> the alloc/free API pairing consistent.
>>
>> Signed-off-by: Bo Sun <bo@mboxify.com>
>> ---
>> drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
>> b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
>> index fd4792e432bf..29f5def796ba 100644
>> --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
>> +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
>> @@ -1822,7 +1822,7 @@ static int cgx_lmac_exit(struct cgx *cgx)
>> continue;
>> 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->mac_to_index_bmap);
>> rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap);
>> rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap);
>> kfree(lmac->name);
>
> The code LGTM, but as Jakub metioned in v1, the cleanup should be
> a separate patch targeting net-next.
>
> On respin you can add:
> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Thanks. Will send the respin targeting net-next once it reopens.
next prev parent reply other threads:[~2026-02-09 11:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 13:09 [PATCH net v2 0/2] octeontx2-af: CGX: fix bitmap leaks Bo Sun
2026-02-06 13:09 ` [PATCH net v2 1/2] " Bo Sun
2026-02-07 12:17 ` Vadim Fedorenko
2026-02-09 7:58 ` Jijie Shao
2026-02-06 13:09 ` [PATCH net v2 2/2] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap() Bo Sun
2026-02-07 12:19 ` Vadim Fedorenko
2026-02-09 10:58 ` Bo Sun [this message]
2026-02-11 4:20 ` [PATCH net v2 0/2] octeontx2-af: CGX: fix bitmap leaks patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95dd319cf45cc5336bd66551157faa68@mboxify.com \
--to=bo@mboxify.com \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sumang@marvell.com \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox