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: <20251003100235.00003a98@huawei.com>
Date: Fri, 3 Oct 2025 10:02:35 +0100
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
CC: Linux PM <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
	Ulf Hansson <ulf.hansson@...aro.org>, Takashi Iwai <tiwai@...e.de>, Dhruva
 Gole <d-gole@...com>
Subject: Re: [PATCH v1] PM: runtime: Introduce one more usage counter guard

On Wed, 01 Oct 2025 19:34:29 +0200
"Rafael J. Wysocki" <rafael@...nel.org> wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Follow previous commit 9a0abc39450a ("PM: runtime: Add auto-cleanup
> macros for "resume and get" operations") and define a runtime PM
> usage counter guard in which pm_runtime_get_noresume() and
> pm_runtime_put_noidle() will be used for incrementing and
> decrementing it, respectively.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Make sense to complete the set.

Reviewed-by: Jonathan Cameron <jonathan.cameorn@...wei.com>

> ---
> 
> Commit 9a0abc39450a is there in my linux-next branch.
> 
> ---
>  include/linux/pm_runtime.h |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- a/include/linux/pm_runtime.h
> +++ b/include/linux/pm_runtime.h
> @@ -610,6 +610,9 @@ static inline int pm_runtime_put_autosus
>  	return __pm_runtime_put_autosuspend(dev);
>  }
>  
> +DEFINE_GUARD(pm_runtime_noresume, struct device *,
> +	     pm_runtime_get_noresume(_T), pm_runtime_put_noidle(_T));
> +
>  DEFINE_GUARD(pm_runtime_active, struct device *,
>  	     pm_runtime_get_sync(_T), pm_runtime_put(_T));
>  DEFINE_GUARD(pm_runtime_active_auto, struct device *,
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ