From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
Dan Carpenter <dan.carpenter@linaro.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
Patil Rajesh Reddy <Patil.Reddy@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc()
Date: Tue, 11 Mar 2025 19:39:27 +0200 [thread overview]
Message-ID: <174171476741.1715.12385728122456798855.b4-ty@linux.intel.com> (raw)
In-Reply-To: <232231fc-6a71-495e-971b-be2a76f6db4c@stanley.mountain>
On Mon, 10 Mar 2025 22:48:29 +0300, Dan Carpenter wrote:
> There are a few problems in this code:
>
> First, if amd_pmf_tee_init() fails then the function returns directly
> instead of cleaning up. We cannot simply do a "goto error;" because
> the amd_pmf_tee_init() cleanup calls tee_shm_free(dev->fw_shm_pool);
> and amd_pmf_tee_deinit() calls it as well leading to a double free.
> I have re-written this code to use an unwind ladder to free the
> allocations.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc()
commit: 5b1122fc4995f308b21d7cfc64ef9880ac834d20
--
i.
prev parent reply other threads:[~2025-03-11 17:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 19:48 Dan Carpenter
2025-03-11 17:39 ` Ilpo Järvinen [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=174171476741.1715.12385728122456798855.b4-ty@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Patil.Reddy@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=dan.carpenter@linaro.org \
--cc=hdegoede@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@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
all inboxes | Powered by JetHome®