lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <95dd319cf45cc5336bd66551157faa68@mboxify.com>
Date: Mon, 09 Feb 2026 18:58:28 +0800
From: Bo Sun <bo@...xify.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: kuba@...nel.org, pabeni@...hat.com, gakula@...vell.com,
 sgoutham@...vell.com, sbhatta@...vell.com, hkelam@...vell.com,
 horms@...nel.org, bbhushan2@...vell.com, andrew+netdev@...n.ch,
 davem@...emloft.net, edumazet@...gle.com, sumang@...vell.com,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2 2/2] octeontx2-af: CGX: replace kfree() with
 rvu_free_bitmap()

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@...xify.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@...ux.dev>

Thanks. Will send the respin targeting net-next once it reopens.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ