Re: [PATCH v3 0/5] gpiolib: improve concurrent access to the flags field of struct gpio_desc

From: Bartosz Golaszewski

Date: Fri Nov 13 2026 - 11:22:46 EST



On Tue, 10 Nov 2026 14:47:00 +0100, Bartosz Golaszewski wrote:
> This is a follow-up to our discussion[1] about desc->flags and possible
> races with users who don't/can't synchronize with other means.
>
> It's an attempt to use try_cmpxchg() to update only the required flags
> atomically where needed + minor fixes using atomic variants of bitops
> where it makes sense.
>
> [...]

Applied, thanks!

[1/5] gpiolib: don't overwrite the entire flags field in gpiod_get_direction()
https://git.kernel.org/brgl/c/8ed87a9adf48703b5729f9d020eb15fa79ffb099
[2/5] gpio: shared: use atomic set_bit() for descriptor flags
https://git.kernel.org/brgl/c/7d1d799d6251bc8cd1d5cfc881b0c09060b6b90d
[3/5] gpiolib: clear debounce period before the "requested" flag
https://git.kernel.org/brgl/c/8509d643ffb7be508568c696c9fe45eb1f84c33c
[4/5] gpiolib: don't overwrite the entire flags field in gpiod_free_commit()
https://git.kernel.org/brgl/c/63d7aedf6add8a24415af4c010588f63fa7296ab
[5/5] gpio: cdev: don't overwrite the whole flags field when configuring lines
https://git.kernel.org/brgl/c/fa8bc4aa06674e78a4ee702966419aa4fdd8dc94

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>