Re: [PATCH] octeontx2-af: Free BPID bitmap on setup failure

From: Simon Horman

Date: Wed Jun 24 2026 - 13:11:38 EST


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.