Netdev List
 help / color / mirror / Atom feed
From: Joe Damato <joe@dama.to>
To: Will Chen <will.chen.tty@gmail.com>
Cc: Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	David Wei <dw@davidwei.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] bnxt: fix memory leak in bnxt_queue_mem_alloc error cases
Date: Tue, 28 Jul 2026 12:22:48 -0700	[thread overview]
Message-ID: <amkBiJ5V9tgzZcYS@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <20260728191146.1744825-1-will.chen.tty@gmail.com>

On Tue, Jul 28, 2026 at 12:11:45PM -0700, Will Chen wrote:
> There is a small memory leak in bnxt_queue_mem_alloc:
> when bnxt_alloc_rx_agg_bmap() succeeds
> but bnxt_alloc_one_tpa_info() later fails,
> the rx_agg_bmap allocated by bnxt_alloc_rx_agg_bmap()
> is not freed in the fallthrough cleanup cases.
> 
> Simply free the rx_agg_bmap in theerr_free_tpa_info case,
> as this is the only remaining error path where
> rx_agg_bmap is allocated and needs to be freed.
> 
> Fixes: bd649c5cc958 ("bnxt_en: handle tpa_info in queue API implementation")
> Signed-off-by: Will Chen <will.chen.tty@gmail.com>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Joe Damato <joe@dama.to>

  reply	other threads:[~2026-07-28 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 19:11 [PATCH net] bnxt: fix memory leak in bnxt_queue_mem_alloc error cases Will Chen
2026-07-28 19:22 ` Joe Damato [this message]
2026-07-28 19:46 ` Michael Chan

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=amkBiJ5V9tgzZcYS@devvm20253.cco0.facebook.com \
    --to=joe@dama.to \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=will.chen.tty@gmail.com \
    /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