]> exis.tech > repos - linux.git/commit
octeontx2-af: Free BPID bitmap on setup failure
authorHaoxiang Li <haoxiang_li2024@163.com>
Tue, 23 Jun 2026 11:43:16 +0000 (19:43 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 25 Jun 2026 15:47:59 +0000 (08:47 -0700)
commit36323f54cd323122a1be89ab2c316a6e55a94e30
tree2341cc74a585cc1e4a70f6d1d58fb44aaa6148ae
parentefd7fb21bad80997bba27c04851bcbc2deeeef4d
octeontx2-af: Free BPID bitmap on setup failure

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 <haoxiang_li2024@163.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260623114316.2182271-1-haoxiang_li2024@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c