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]
Message-ID: <CAPDyKFoSr3EmAcJzw36You7BLfq-TY7KkvdtrZ_O4Wq2a=6AYw@mail.gmail.com>
Date: Mon, 3 Mar 2025 12:47:35 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Linux PM <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, 
	Alan Stern <stern@...land.harvard.edu>, Johan Hovold <johan@...nel.org>, 
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>, Jon Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH v2] PM: runtime: Drop status check from pm_runtime_force_resume()

On Thu, 27 Feb 2025 at 11:56, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
>
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Since pm_runtime_force_resume() requires pm_runtime_force_suspend() to
> be called before it on the same device, the runtime PM status of the
> device is RPM_SUSPENDED when it is called unless the device's runtime
> PM status is changed somewhere else in the meantime.
>
> However, even if that happens, the power.needs_force_resume
> check is still required to pass and that flag is only set by
> pm_runtime_force_suspend() once and it is cleared at the end of
> pm_runtime_force_resume(), so it cannot be taken into account
> twice in a row.
>
> According to the above, the pm_runtime_status_suspended(dev) check in
> pm_runtime_force_resume() is redundant, so drop it.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Seems reasonable to me! Please add:

Reviewed-by: Ulf Hansson <ulf.hansson@...aro.org>

Kind regards
Uffe

> ---
>
> The previous version of this patch is here:
>
> https://lore.kernel.org/linux-pm/6038511.MhkbZ0Pkbq@rjwysocki.net/
>
> v1 -> v2: Minor changelog edits.
>
> ---
>  drivers/base/power/runtime.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/base/power/runtime.c
> +++ b/drivers/base/power/runtime.c
> @@ -1982,7 +1982,7 @@
>         int (*callback)(struct device *);
>         int ret = 0;
>
> -       if (!pm_runtime_status_suspended(dev) || !dev->power.needs_force_resume)
> +       if (!dev->power.needs_force_resume)
>                 goto out;
>
>         /*
>
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ