Re: [PATCH v2] gpiolib: fix race condition for gdev->srcu

From: Bartosz Golaszewski
Date: Fri Jan 02 2026 - 04:36:26 EST



On Wed, 24 Dec 2025 09:26:40 +0100, Bartosz Golaszewski wrote:
> If two drivers were calling gpiochip_add_data_with_key(), one may be
> traversing the srcu-protected list in gpio_name_to_desc(), meanwhile
> other has just added its gdev in gpiodev_add_to_list_unlocked().
> This creates a non-mutexed and non-protected timeframe, when one
> instance is dereferencing and using &gdev->srcu, before the other
> has initialized it, resulting in crash:
>
> [...]

Applied, thanks!

[1/1] gpiolib: fix race condition for gdev->srcu
commit: a7ac22d53d0990152b108c3f4fe30df45fcb0181

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