From: Simon Horman <horms@kernel.org>
To: haoxiang_li2024 <haoxiang_li2024@163.com>
Cc: sgoutham@marvell.com, lcherian@marvell.com, gakula@marvell.com,
hkelam@marvell.com, sbhatta@marvell.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] octeontx2-af: Free BPID bitmap on setup failure
Date: Fri, 26 Jun 2026 16:22:26 +0100 [thread overview]
Message-ID: <20260626152226.GC1310988@horms.kernel.org> (raw)
In-Reply-To: <78397a8d.5bc.19efc3325e6.Coremail.haoxiang_li2024@163.com>
On Thu, Jun 25, 2026 at 08:34:31AM +0800, haoxiang_li2024 wrote:
>
>
> At 2026-06-25 01:09:30, "Simon Horman" <horms@kernel.org> 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@vger.kernel.org
> >> Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
> >
> >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.
next prev parent reply other threads:[~2026-06-26 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 11:43 [PATCH] octeontx2-af: Free BPID bitmap on setup failure Haoxiang Li
2026-06-24 17:09 ` Simon Horman
2026-06-25 0:34 ` haoxiang_li2024
2026-06-26 15:22 ` Simon Horman [this message]
2026-06-25 15:50 ` Jakub Kicinski
2026-06-25 16:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260626152226.GC1310988@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=haoxiang_li2024@163.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox