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: <CAJZ5v0j6W5j=t7MrXhwNCpgyzSU6CWvwmMMqkrcvwtBJcvbKzw@mail.gmail.com>
Date: Sat, 22 Mar 2025 15:08:28 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Colin Ian King <colin.i.king@...il.com>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown <len.brown@...el.com>, 
	Pavel Machek <pavel@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	Danilo Krummrich <dakr@...nel.org>, linux-pm@...r.kernel.org, kernel-janitors@...r.kernel.org, 
	Ulf Hansson <ulf.hansson@...aro.org>, Bjorn Helgaas <bhelgaas@...gle.com>, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] PM: sleep: Fix bit masking operation

On Wed, Mar 19, 2025 at 12:44 PM Colin Ian King <colin.i.king@...il.com> wrote:
>
> The mask operation link->flags | DL_FLAG_PM_RUNTIME is always true which
> is incorrect. The mask operation should be using the bit-wise &
> operator. Fix this.
>
> Fixes: bca84a7b93fd ("PM: sleep: Use DPM_FLAG_SMART_SUSPEND conditionally")
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
>  drivers/base/power/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> index ad50018b8047..ac2a197c1234 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -1836,7 +1836,7 @@ static bool device_prepare_smart_suspend(struct device *dev)
>         idx = device_links_read_lock();
>
>         list_for_each_entry_rcu_locked(link, &dev->links.suppliers, c_node) {
> -               if (!(link->flags | DL_FLAG_PM_RUNTIME))
> +               if (!(link->flags & DL_FLAG_PM_RUNTIME))
>                         continue;
>
>                 if (!dev_pm_smart_suspend(link->supplier) &&
> --

Ouch, thanks for the fix!

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ