Re:Re: [PATCH] octeontx2-af: Free BPID bitmap on setup failure
From: haoxiang_li2024
Date: Wed Jun 24 2026 - 20:35:59 EST
At 2026-06-25 01:09:30, "Simon Horman" <horms@xxxxxxxxxx> wrote:
>On Tue, Jun 23, 2026 at 07:43:16PM +0800, Haoxiang Li wrote:
>> nix_setup_bpids() allocates bp->bpids with rvu_alloc_bitmap(), which uses
>> a plain kcalloc(). If any of the following devm_kcalloc() allocations for
>> the BPID mapping arrays fails, the function returns without freeing the
>> bitmap. Free the BPID bitmap before returning from those error paths.
>>
>> Fixes: d6212d2e41a0 ("octeontx2-af: Create BPIDs free pool")
>> Cc: stable@xxxxxxxxxxxxxxx
>> Signed-off-by: Haoxiang Li <haoxiang_li2024@xxxxxxx>
>
>Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
>
>I am wondering if you did a pass for any other similar problems
>with users of rvu_alloc_bitmap.
Thanks for your review! Yes, I did. I found similar issues in
nix_setup_ipolicers() and rvu_setup_msix_resources(), and
I will address them in follow-up patches.
Thanks,
Haoxiang