Patch "gpiolib: fix debugfs newline separators" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gpiolib: fix debugfs newline separators

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpiolib-fix-debugfs-newline-separators.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e36937357da8906fa4217d93f2830a8cbcddd910
Author: Johan Hovold <johan+linaro@xxxxxxxxxx>
Date:   Mon Oct 28 13:49:58 2024 +0100

    gpiolib: fix debugfs newline separators
    
    [ Upstream commit 3e8b7238b427e05498034c240451af5f5495afda ]
    
    The gpiolib debugfs interface exports a list of all gpio chips in a
    system and the state of their pins.
    
    The gpio chip sections are supposed to be separated by a newline
    character, but a long-standing bug prevents the separator from
    being included when output is generated in multiple sessions, making the
    output inconsistent and hard to read.
    
    Make sure to only suppress the newline separator at the beginning of the
    file as intended.
    
    Fixes: f9c4a31f6150 ("gpiolib: Use seq_file's iterator interface")
    Cc: stable@xxxxxxxxxxxxxxx      # 3.7
    Cc: Thierry Reding <treding@xxxxxxxxxx>
    Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241028125000.24051-2-johan+linaro@xxxxxxxxxx
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 148bcfbf98e02..1f522499c6fc5 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4834,6 +4834,8 @@ static void *gpiolib_seq_start(struct seq_file *s, loff_t *pos)
 		return NULL;
 
 	s->private = priv;
+	if (*pos > 0)
+		priv->newline = true;
 	priv->idx = srcu_read_lock(&gpio_devices_srcu);
 
 	list_for_each_entry_srcu(gdev, &gpio_devices, list,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux