[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <14217efc565a011da5cc8cd724794d81@mboxify.com>
Date: Fri, 06 Feb 2026 18:09:38 +0800
From: bo@...xify.com
To: Jakub Kicinski <kuba@...nel.org>
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 2026-02-05 23:48, Jakub Kicinski wrote:
> 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.
Thanks, I'll send v2.
Powered by blists - more mailing lists