Re: [PATCH] ACPI: PCC: Fix race condition by removing static qualifier
From: lihuisong (C)
Date: Wed Dec 10 2025 - 20:36:38 EST
在 2025/12/10 22:54, Sudeep Holla 写道:
On Wed, Dec 10, 2025 at 09:26:34PM +0800, Pengjie Zhang wrote:
The variable 'ret' in acpi_pcc_address_space_setup() is currently
declared with the 'static' storage specifier. This can lead to race
conditions in a multithreaded environment.
Remove the 'static' qualifier to ensure 'ret' is allocated directly
on the stack as a local variable.
Ah, my mistake. I’m not sure how that slipped in other than a simple typo or
copy/paste error. Thanks for catching it. Let me know if you spotted it
because something broke or just from reading the code.
Reviewed-by: Sudeep Holla <sudeep.holla@xxxxxxx>
Acked-by: lihuisong@xxxxxxxxxx