public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Bo Sun <bo@mboxify.com>
Cc: pabeni@redhat.com, sgoutham@marvell.com, lcherian@marvell.com,
	gakula@marvell.com, jerinj@marvell.com, hkelam@marvell.com,
	sbhatta@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net 1/1] octeontx2-af: CGX: fix bitmap leaks
Date: Thu, 5 Feb 2026 07:48:59 -0800	[thread overview]
Message-ID: <20260205074859.27392792@kernel.org> (raw)
In-Reply-To: <ba2c3143-0761-4903-ac0e-88ca502b4e50@mboxify.com>

On Thu, 5 Feb 2026 21:35:29 +0800 Bo Sun wrote:
> >> Fixes: e740003874ed ("octeontx2-af: Flow control resource management")
> >> Cc: stable@vger.kernel.org
> >> Signed-off-by: Bo Sun <bo@mboxify.com>  
> > 
> > Looks like rvu_free_bitmap() exists. We should probably use it?  
> 
> Apologies for the late reply.
> You're right that rvu_free_bitmap() exists. I stayed with direct kfree()
> for consistency with the existing code in cgx_lmac_exit(), because which
> already uses kfree(lmac->mac_to_index_bmap.bmap).
> 
> That said, I'm OK with either way:
> 1. Keep kfree() to match the existing pattern in this function
> 2. Switch all three bitmap frees (including mac_to_index_bmap) to use
> rvu_free_bitmap() for consistency with the alloc/free API pairing
> 
> What's your preference?

3. do what I implied, just use rvu_free_bitmap() in this single case
for the fix. Follow up separately with a patch to remaining sites if
any to convert from kfree() to rvu_free_bitmap(). We want the fix
itself to be small, the cleanup should be separate.

  reply	other threads:[~2026-02-05 15:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251020143112.357819-1-bo@mboxify.com>
2025-10-20 14:31 ` [PATCH net 1/1] octeontx2-af: CGX: fix bitmap leaks Bo Sun
2025-10-20 15:45   ` Alexander Lobakin
2025-10-23  1:22   ` Jakub Kicinski
2026-02-05 13:35     ` Bo Sun
2026-02-05 15:48       ` Jakub Kicinski [this message]
2026-02-06 10:09         ` bo

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=20260205074859.27392792@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bo@mboxify.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=stable@vger.kernel.org \
    /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