[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260205074859.27392792@kernel.org>
Date: Thu, 5 Feb 2026 07:48:59 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Bo Sun <bo@...xify.com>
Cc: pabeni@...hat.com, sgoutham@...vell.com, lcherian@...vell.com,
gakula@...vell.com, jerinj@...vell.com, hkelam@...vell.com,
sbhatta@...vell.com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH net 1/1] octeontx2-af: CGX: fix bitmap leaks
On Thu, 5 Feb 2026 21:35:29 +0800 Bo Sun wrote:
> >> Fixes: e740003874ed ("octeontx2-af: Flow control resource management")
> >> Cc: stable@...r.kernel.org
> >> Signed-off-by: Bo Sun <bo@...xify.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.
Powered by blists - more mailing lists