Thread (6 messages) 6 messages, 4 authors, 21d ago

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

From: Simon Horman <horms@kernel.org>
Date: 2026-06-26 15:22:31
Also in: lkml, stable

On Thu, Jun 25, 2026 at 08:34:31AM +0800, haoxiang_li2024 wrote:

At 2026-06-25 01:09:30, "Simon Horman" [off-list ref] wrote:
quoted
On Tue, Jun 23, 2026 at 07:43:16PM +0800, Haoxiang Li wrote:
quoted
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@vger.kernel.org
Signed-off-by: Haoxiang Li <redacted>
Reviewed-by: Simon Horman <horms@kernel.org>

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.
Likewise, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help