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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mf6yaZMsF5x=vPet=y9fa5ZTuWSAA=oi+Qw07TF8GEFbA@mail.gmail.com>
Date: Thu, 31 Oct 2024 18:02:43 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>, linux-gpio@...r.kernel.org, 
	linux-kernel@...r.kernel.org, stable@...r.kernel.org, 
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH 2/3] gpiolib: fix debugfs dangling chip separator

On Mon, Oct 28, 2024 at 1:50 PM Johan Hovold <johan+linaro@...nel.org> wrote:
>
> Add the missing newline after entries for recently removed gpio chips
> so that the chip sections are separated by a newline as intended.
>
> Fixes: e348544f7994 ("gpio: protect the list of GPIO devices with SRCU")
> Cc: stable@...r.kernel.org      # 6.9
> Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> ---
>  drivers/gpio/gpiolib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index e27488a90bc9..2b02655abb56 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -4971,7 +4971,7 @@ static int gpiolib_seq_show(struct seq_file *s, void *v)
>
>         gc = srcu_dereference(gdev->chip, &gdev->srcu);
>         if (!gc) {
> -               seq_printf(s, "%s%s: (dangling chip)",
> +               seq_printf(s, "%s%s: (dangling chip)\n",
>                            priv->newline ? "\n" : "",
>                            dev_name(&gdev->dev));
>                 return 0;
> --
> 2.45.2
>

But with this change we go from an incorrect:

# cat /sys/kernel/debug/gpio
gpiochip0: (dangling chip)
gpiochip1: (dangling chip)
gpiochip2: (dangling chip)root@...ux86-64:~#

to still incorrect:

# cat /sys/kernel/debug/gpio
gpiochip0: (dangling chip)

gpiochip1: (dangling chip)

gpiochip2: (dangling chip)

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ