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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ihdg3S0--73OjdMjCxkE1NaEmBEEOc-gDS-u64gC0+rA@mail.gmail.com>
Date: Fri, 9 May 2025 15:49:37 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Zijun Hu <zijun_hu@...oud.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Pavel Machek <pavel@...nel.org>, Len Brown <len.brown@...el.com>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH] PM: wakeup: Delete space in the end of string shown by pm_show_wakelocks()

On Mon, May 5, 2025 at 11:27 AM Zijun Hu <zijun_hu@...oud.com> wrote:
>
> From: Zijun Hu <quic_zijuhu@...cinc.com>
>
> pm_show_wakelocks() is called to generate a string when showing attributes
> /sys/power/wake_(lock|unlock), but the string ends with an unwanted space
> the space was added back by mistake by commit c9d967b2ce40
> ("PM: wakeup: simplify the output logic of pm_show_wakelocks()").
>
> Remove the unwanted space.
>
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> ---
>  kernel/power/wakelock.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c
> index 52571dcad768b988eaadbd3ce98a4ac42dd2f7dd..4e941999a53ba69410f4526d5d55c32312c36140 100644
> --- a/kernel/power/wakelock.c
> +++ b/kernel/power/wakelock.c
> @@ -49,6 +49,9 @@ ssize_t pm_show_wakelocks(char *buf, bool show_active)
>                         len += sysfs_emit_at(buf, len, "%s ", wl->name);
>         }
>
> +       if (len > 0)
> +               --len;
> +
>         len += sysfs_emit_at(buf, len, "\n");
>
>         mutex_unlock(&wakelocks_lock);
>
> ---

Applied as 6.16 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ