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, rajesh.borundia@qlogic.com,
sucheta.chakraborty@qlogic.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
Date: Thu, 8 May 2025 18:36:47 +0100 [thread overview]
Message-ID: <20250508173647.GN3339421@horms.kernel.org> (raw)
In-Reply-To: <20250507152102.53783-1-abdun.nihaal@gmail.com>
On Wed, May 07, 2025 at 08:51:00PM +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().
Thanks, I agree with your analysis.
But I think it would be nice to include some text regarding
how you found the bug, e.g. by inspection, using static analysis,
via a crash.
And if you have been able to test the patch on hardware,
or if, rather, it is compile tested only.
>
> Fixes: f197a7aa6288 ("qlcnic: VF-PF communication channel implementation")
> Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
...
next prev parent reply other threads:[~2025-05-08 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 15:21 [PATCH net] qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd() Abdun Nihaal
2025-05-08 17:36 ` Simon Horman [this message]
2025-05-11 16:40 ` Abdun Nihaal
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=20250508173647.GN3339421@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).