netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: hyper <hyperlyzcs@gmail.com>,
	shannon.nelson@amd.com, brett.creeley@amd.com,
	 davem@davemloft.net, edumazet@google.com, kuba@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jitxie@tencent.com,  huntazhang@tencent.com
Subject: Re: [PATCH net V2] net: pds_core: Fix possible double free in error handling path
Date: Tue, 05 Mar 2024 15:58:37 +0100	[thread overview]
Message-ID: <9c4da99a83bceb4680aac9588151cc8190ff07e0.camel@redhat.com> (raw)
In-Reply-To: <20240303084954.14498-1-hyperlyzcs@gmail.com>

On Sun, 2024-03-03 at 16:49 +0800, hyper wrote:
> When auxiliary_device_add() returns error and then calls
> auxiliary_device_uninit(), Callback function pdsc_auxbus_dev_release
> calls kfree(padev) to free memory. We shouldn't call kfree(padev)
> again in the error handling path.
> 
> Fix this by cleaning up the redundant kfree() and putting
> the error handling back to where the errors happened.
> 
> Fixes: 4569cce43bc6 ("pds_core: add auxiliary_bus devices")
> Signed-off-by: hyper <hyperlyzcs@gmail.com>

Note that submitters are required to use real identity:

https://elixir.bootlin.com/linux/v6.8-rc7/source/Documentation/process/submitting-patches.rst#L438

Could you please repost avoiding the nick name?

You can retain the already collected acks.

Thanks,

Paolo


  parent reply	other threads:[~2024-03-05 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  2:23 [PATCH] pds_core: Fix possible double free in error handling path hyper
2024-03-01 17:55 ` Nelson, Shannon
2024-03-03  8:49   ` [PATCH net V2] net: " hyper
2024-03-04 17:21     ` Nelson, Shannon
2024-03-04 20:26     ` Breno Leitao
2024-03-05 14:58     ` Paolo Abeni [this message]
2024-03-06 10:57       ` [PATCH net V3] " Yongzhi Liu
2024-03-06 13:44         ` Wojciech Drewek
2024-03-06 17:05         ` Nelson, Shannon
2024-03-07 11:10         ` 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=9c4da99a83bceb4680aac9588151cc8190ff07e0.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=huntazhang@tencent.com \
    --cc=hyperlyzcs@gmail.com \
    --cc=jitxie@tencent.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shannon.nelson@amd.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).