From: Simon Horman <horms@kernel.org>
To: Abdun Nihaal <abdun.nihaal@gmail.com>
Cc: shshaikh@marvell.com, manishc@marvell.com,
GR-Linux-NIC-Dev@marvell.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, sucheta.chakraborty@qlogic.com,
rajesh.borundia@qlogic.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
Date: Mon, 12 May 2025 17:57:01 +0100 [thread overview]
Message-ID: <20250512165701.GT3339421@horms.kernel.org> (raw)
In-Reply-To: <20250512044829.36400-1-abdun.nihaal@gmail.com>
On Mon, May 12, 2025 at 10:18:27AM +0530, Abdun Nihaal wrote:
> In one of the error paths in qlcnic_sriov_channel_cfg_cmd(), the memory
> allocated in qlcnic_sriov_alloc_bc_mbx_args() for mailbox arguments is
> not freed. Fix that by jumping to the error path that frees them, by
> calling qlcnic_free_mbx_args(). This was found using static analysis.
>
> Fixes: f197a7aa6288 ("qlcnic: VF-PF communication channel implementation")
> Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
> ---
> This patch is only compile tested. Not tested on real hardware.
>
> V1->V2 : Added information about how the bug was found and how the
> patch was tested, as suggested by Simon Horman.
>
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-05-12 16:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 4:48 [PATCH net v2] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd() Abdun Nihaal
2025-05-12 16:57 ` Simon Horman [this message]
2025-05-14 0:30 ` 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=20250512165701.GT3339421@horms.kernel.org \
--to=horms@kernel.org \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=abdun.nihaal@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rajesh.borundia@qlogic.com \
--cc=shshaikh@marvell.com \
--cc=sucheta.chakraborty@qlogic.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;
as well as URLs for NNTP newsgroup(s).