From: "Krzysztof Wilczyński" <kw@linux.com>
To: Ma Ke <make24@iscas.ac.cn>
Cc: lpieralisi@kernel.org, mani@kernel.org, kishon@kernel.org,
bhelgaas@google.com, jpinto@synopsys.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] PCI: endpoint: Fix a double free in __pci_epc_create()
Date: Fri, 21 Feb 2025 01:23:13 +0900 [thread overview]
Message-ID: <20250220162313.GD2510987@rocinante> (raw)
In-Reply-To: <20250114005737.GA2004845@rocinante>
Hello,
> > The put_device(&epc->dev) call will trigger pci_epc_release() which
> > frees "epc" so the kfree(epc) on the next line is a double free.
> >
> > Found by code review.
[...]
> Which kernel release did you review? I don't see this kfree() when looking
> at the current code base per:
>
> https://elixir.bootlin.com/linux/v6.13-rc1/source/drivers/pci/endpoint/pci-epc-core.c#L956-L1020
I will answer my own question. This surplus kfree() has already been
removed as part of the following commit:
c9501d268944 ("PCI: endpoint: Fix double free in __pci_epc_create()")
Nevertheless, thank you for the patch.
Krzysztof
next prev parent reply other threads:[~2025-02-20 16:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 7:46 [PATCH] PCI: endpoint: Fix a double free in __pci_epc_create() Ma Ke
2025-01-14 0:57 ` Krzysztof Wilczyński
2025-02-20 16:23 ` Krzysztof Wilczyński [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-02 9:30 Ma Ke
2025-01-03 10:28 ` Markus Elfring
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=20250220162313.GD2510987@rocinante \
--to=kw@linux.com \
--cc=bhelgaas@google.com \
--cc=jpinto@synopsys.com \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=make24@iscas.ac.cn \
--cc=mani@kernel.org \
--cc=stable@vger.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