[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <174171476741.1715.12385728122456798855.b4-ty@linux.intel.com>
Date: Tue, 11 Mar 2025 19:39:27 +0200
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@....com>,
Dan Carpenter <dan.carpenter@...aro.org>
Cc: Hans de Goede <hdegoede@...hat.com>,
Patil Rajesh Reddy <Patil.Reddy@....com>,
Mario Limonciello <mario.limonciello@....com>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86/amd/pmf: fix cleanup in
amd_pmf_init_smart_pc()
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.
Powered by blists - more mailing lists