From: Edward Cree <ecree.xilinx@gmail.com>
To: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com,
alejandro.lucero-palau@amd.com, habetsm.xilinx@gmail.com,
netdev@vger.kernel.org, linux-net-drivers@amd.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] sfc: fix potential memory leak in efx_mae_process_mport()
Date: Thu, 23 Oct 2025 12:27:19 +0100 [thread overview]
Message-ID: <bf3d9390-f1f6-428d-b47f-81d2ed1707e9@gmail.com> (raw)
In-Reply-To: <20251022163525.86362-1-nihaal@cse.iitm.ac.in>
On 22/10/2025 17:35, Abdun Nihaal wrote:
> In efx_mae_enumerate_mports(), memory allocated for mae_mport_desc is
> passed as a argument to efx_mae_process_mport(), but when the error path
> in efx_mae_process_mport() gets executed, the memory allocated for desc
> gets leaked.
>
> Fix that by freeing the memory allocation before returning error.
>
> Fixes: a6a15aca4207 ("sfc: enumerate mports in ef100")
> Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Acked-by: Edward Cree <ecree.xilinx@gmail.com>
It might be nice to also add a comment on top of efx_mae_process_mport()
stating that it takes ownership of @desc from the caller.
next prev parent reply other threads:[~2025-10-23 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 16:35 Abdun Nihaal
2025-10-23 11:27 ` Edward Cree [this message]
2025-10-23 14:08 ` 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=bf3d9390-f1f6-428d-b47f-81d2ed1707e9@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=alejandro.lucero-palau@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=habetsm.xilinx@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=netdev@vger.kernel.org \
--cc=nihaal@cse.iitm.ac.in \
--cc=pabeni@redhat.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
all inboxes | Powered by JetHome®