lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gXHedm9WwwMuTN7vYyf5fNB6yOGLp_-GxSoZAEhSx5aw@mail.gmail.com>
Date: Fri, 19 Sep 2025 13:17:28 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Linux ACPI <linux-acpi@...r.kernel.org>, Huisong Li <lihuisong@...wei.com>, 
	LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>, 
	Mario Limonciello <mario.limonciello@....com>, 
	"Shenoy, Gautham Ranjal" <gautham.shenoy@....com>
Subject: Re: [PATCH v1 1/2] ACPI: processor: Update cpuidle driver check in __acpi_processor_start()

On Thu, Sep 18, 2025 at 11:10 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Commit 7a8c994cbb2d ("ACPI: processor: idle: Optimize ACPI idle
> driver registration") moved the ACPI idle driver registration to
> acpi_processor_driver_init() and acpi_processor_power_init() does
> not register an idle driver any more, so the cpuidle driver check
> in __acpi_processor_start() needs to be updated to avoid calling
> acpi_processor_power_init() without a cpuidle driver (in which
> case the registration of the cpuidle device in that function
> would fail anyway).

It's worse, it won't just fail, it'll lead to a NULL pointer
dereference in __cpuidle_register_device().

I'll update the changelog while applying the patch.


> Fixes: 7a8c994cbb2d ("ACPI: processor: idle: Optimize ACPI idle driver registration")
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>
> Commit 7a8c994cbb2d is only in linux-next at this point.
>
> ---
>  drivers/acpi/processor_driver.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/acpi/processor_driver.c
> +++ b/drivers/acpi/processor_driver.c
> @@ -166,7 +166,7 @@ static int __acpi_processor_start(struct
>         if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS))
>                 dev_dbg(&device->dev, "CPPC data invalid or not present\n");
>
> -       if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
> +       if (cpuidle_get_driver() == &acpi_idle_driver)
>                 acpi_processor_power_init(pr);
>
>         acpi_pss_perf_init(pr);
>
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ