From: Jakub Kicinski <kuba@kernel.org>
To: Jianglei Nie <niejianglei2021@163.com>
Cc: aelior@marvell.com, skalluru@marvell.com, manishc@marvell.com,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bnx2x: fix potential memory leak in bnx2x_tpa_stop()
Date: Mon, 19 Sep 2022 14:21:19 -0700 [thread overview]
Message-ID: <20220919142119.5b473800@kernel.org> (raw)
In-Reply-To: <20220907065128.55190-1-niejianglei2021@163.com>
On Wed, 7 Sep 2022 14:51:28 +0800 Jianglei Nie wrote:
> bnx2x_tpa_stop() allocates a memory chunk from new_data with
> bnx2x_frag_alloc(). The new_data should be freed when gets some error.
> But when "pad + len > fp->rx_buf_size" is true, bnx2x_tpa_stop() returns
> without releasing the new_data, which will lead to a memory leak.
>
> We should free the new_data with bnx2x_frag_free() when "pad + len >
> fp->rx_buf_size" is true.
Please add a Fixes tag and repost.
next prev parent reply other threads:[~2022-09-19 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 6:51 [PATCH] bnx2x: fix potential memory leak in bnx2x_tpa_stop() Jianglei Nie
2022-09-19 21:21 ` Jakub Kicinski [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-09-29 2:37 Jianglei Nie
2022-09-29 16:20 ` Jakub Kicinski
2022-09-30 6:28 Jianglei Nie
2022-10-03 11:50 ` 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=20220919142119.5b473800@kernel.org \
--to=kuba@kernel.org \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=niejianglei2021@163.com \
--cc=pabeni@redhat.com \
--cc=skalluru@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.