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] [day] [month] [year] [list]
Date:   Tue, 21 Jun 2022 21:00:48 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Dmitry Osipenko <dmitry.osipenko@...labora.com>
Cc:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Ken Moffat <zarniwhoop@...world.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v1] PM: hibernate: Use kernel_can_power_off()

On Fri, Jun 17, 2022 at 2:24 PM Dmitry Osipenko
<dmitry.osipenko@...labora.com> wrote:
>
> Use new kernel_can_power_off() API instead of legacy pm_power_off global
> variable to fix regressed hibernation to disk where machine no longer
> powers off when it should because ACPI power driver transitioned to the
> new sys-off based API and it doesn't use pm_power_off anymore.
>
> Fixes: 98f30d0ecf79 ("ACPI: power: Switch to sys-off handler API")
> Tested-by: Ken Moffat <zarniwhoop@...world.com>
> Reported-by: Ken Moffat <zarniwhhop@...world.com>
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@...labora.com>
> ---
>  kernel/power/hibernate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 20a66bf9f465..89c71fce225d 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -665,7 +665,7 @@ static void power_down(void)
>                 hibernation_platform_enter();
>                 fallthrough;
>         case HIBERNATION_SHUTDOWN:
> -               if (pm_power_off)
> +               if (kernel_can_power_off())
>                         kernel_power_off();
>                 break;
>         }
> --

Applied as 5.19-rc material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ