ACPI: processor_idle: Mark LPI enter functions as __cpuidle
Subsystems (2)
PATCH 1/1 ACPI: processor_idle: Mark LPI enter functions as __cpuidle
From: Li RongQing <[email protected]>
[ Upstream commit 956ca5d72c76504824c8eb601879da9476973e15 ]
When function tracing or Kprobes is enabled, entering an ACPI Low Power Idle (LPI) state triggers the following RCU splat:
RCU not on for: acpi_idle_lpi_enter+0x4/0xd8
WARNING: CPU: 8 PID: 0 at include/linux/trace_recursion.h:162 function_trace_call+0x1e8/0x228
The acpi_idle_lpi_enter() function is invoked within the cpuidle path after RCU has already been disabled for the current local CPU. Consequently, ftrace's function_trace_call() expects RCU to be actively watching before recording trace data, emitting a warning if it is not.
Fix this by annotating acpi_idle_lpi_enter(), the generic __weak stub, and the RISC-V implementation of acpi_processor_ffh_lpi_enter() with __cpuidle. This moves these functions into the '.cpuidle.text' section, implicitly disabling ftrace instrumentation (notrace) along this sensitive path and preventing trace-induced RCU warnings during idle entry.
[ Backport to 6.6.y: Omit the RISC-V hunk because this target has no
RISC-V ACPI LPI implementation. ]
---
Hi,
Please consider this backport of the fix for CVE-2026-80611 to 6.6.y.
The code changes are identical to upstream, except the absent RISC-V LPI hunk is omitted. See the bracketed backport note above.
The complete fix is already present in 6.12.y, 6.18.y and 7.2.y.
Build-tested only as part of a cumulative 6.6.y series: the x86_64 ACPI processor-idle object (allmodconfig, CONFIG_WERROR=y); no runtime testing.
Thanks,
Artem Dinaburg
drivers/acpi/processor_idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/processor_idle.c +2 -2
@@ -1175,7 +1175,7 @@ static int acpi_processor_get_lpi_info(struct acpi_processor *pr)return 0 ; } -int __weak acpi_processor_ffh_lpi_enter (struct acpi_lpi_state *lpi) +int __weak __cpuidle acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi) {return -ENODEV ; }
@@ -1188,7 +1188,7 @@ int __weak acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)* * Return: 0 for success or negative value for error */ -static int acpi_idle_lpi_enter (struct cpuidle_device *dev, +static int __cpuidle acpi_idle_lpi_enter(struct cpuidle_device *dev,struct cpuidle_driver *drv,int index) {struct acpi_processor *pr;
Quoted 2 lines
When function tracing or Kprobes is enabled, entering an ACPI Low Power Idle (LPI) state triggers the following RCU splat:
Queued for 6.6, thanks.
Signature · 2 lines
Thanks, Sasha