Re: [PATCH v4 0/6] gpio: Refactor and add selftest

From: Bartosz Golaszewski

Date: Wed Feb 25 2026 - 05:28:49 EST


On Mon, 23 Feb 2026 07:17:20 +0100, Tzung-Bi Shih <tzungbi@xxxxxxxxxx> said:
> The series is separated from v3 to lessen the burden on the subsequent
> revocable work per suggestion in
> https://lore.kernel.org/all/CAMRc=MfQumD1ULx7yU4W2sx=35wyQf7-v4tSf44OqEu3JDBUAg@xxxxxxxxxxxxxx/.
>
> The series is based on v7.0-rc1 and applies after
> https://lore.kernel.org/all/20260205092840.2574840-1-tzungbi@xxxxxxxxxx.
>
> ---
> v4:
> - Separate the first 6 patches from v3.
>
> v3: https://lore.kernel.org/all/20260213092958.864411-1-tzungbi@xxxxxxxxxx
>
> Tzung-Bi Shih (6):
> gpio: Access `gpio_bus_type` in gpiochip_setup_dev()
> gpio: Remove redundant check for struct gpio_chip
> gpio: sysfs: Remove redundant check for struct gpio_chip
> gpio: Ensure struct gpio_chip for gpiochip_setup_dev()
> gpio: cdev: Don't check struct gpio_chip in gpio_chrdev_open()
> selftests: gpio: Add gpio-cdev-uaf tests
>
> drivers/gpio/gpiolib-cdev.c | 20 +-
> drivers/gpio/gpiolib-cdev.h | 2 +-
> drivers/gpio/gpiolib-sysfs.c | 32 +-
> drivers/gpio/gpiolib-sysfs.h | 8 +-
> drivers/gpio/gpiolib.c | 46 +--
> tools/testing/selftests/gpio/Makefile | 5 +-
> tools/testing/selftests/gpio/gpio-cdev-uaf.c | 292 ++++++++++++++++++
> tools/testing/selftests/gpio/gpio-cdev-uaf.sh | 63 ++++
> 8 files changed, 402 insertions(+), 66 deletions(-)
> create mode 100644 tools/testing/selftests/gpio/gpio-cdev-uaf.c
> create mode 100755 tools/testing/selftests/gpio/gpio-cdev-uaf.sh
>
> --
> 2.51.0
>
>

Hi Tzung-Bi!

This no longer applies on top of current linux-next. Could you please rabase
and resend?

Thanks!
Bart