From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Ma Ke <make24@iscas.ac.cn>
Cc: <linux-hyperv@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kys@microsoft.com>,
<haiyangz@microsoft.com>, <wei.liu@kernel.org>,
<decui@microsoft.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<shradhagupta@linux.microsoft.com>, <horms@kernel.org>,
<kotaranov@microsoft.com>, <linyunsheng@huawei.com>,
<schakrabarti@linux.microsoft.com>, <erick.archer@outlook.com>
Subject: Re: [PATCH] net: mana: Fix possible double free in error handling path
Date: Mon, 24 Jun 2024 11:16:16 +0200 [thread overview]
Message-ID: <776f3d3c-dfd5-4bad-a612-97806d234d0a@intel.com> (raw)
In-Reply-To: <20240624032112.2286526-1-make24@iscas.ac.cn>
On 6/24/24 05:21, Ma Ke wrote:
> When auxiliary_device_add() returns error and then calls
> auxiliary_device_uninit(), callback function adev_release
I would add () after function name
> calls kfree(madev) to free memory. We shouldn't call kfree(padev)
there is no `padev` in the patch :)
"to free memory" part sounds redundant.
> again in the error handling path.
>
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
you need a Fixes: tag
> ---
> drivers/net/ethernet/microsoft/mana/mana_en.c | 31 +++++++++----------
> 1 file changed, 14 insertions(+), 17 deletions(-)
>
prev parent reply other threads:[~2024-06-24 9:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 3:21 [PATCH] net: mana: Fix possible double free in error handling path Ma Ke
2024-06-24 8:38 ` Sai Krishna Gajula
2024-06-24 10:18 ` Konstantin Taranov
2024-06-24 9:16 ` Przemek Kitszel [this message]
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=776f3d3c-dfd5-4bad-a612-97806d234d0a@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=erick.archer@outlook.com \
--cc=haiyangz@microsoft.com \
--cc=horms@kernel.org \
--cc=kotaranov@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=make24@iscas.ac.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=schakrabarti@linux.microsoft.com \
--cc=shradhagupta@linux.microsoft.com \
--cc=wei.liu@kernel.org \
/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).