Re: (subset) [PATCH v3 0/2] gpio: fix sleeping-in-atomic in shared-proxy; restore meson non-sleeping

From: Bartosz Golaszewski

Date: Tue Jun 30 2026 - 10:13:09 EST



On Tue, 30 Jun 2026 13:15:43 +0300, Viacheslav Bocharov wrote:
> gpio-shared-proxy chooses its descriptor lock (mutex vs spinlock) from
> the underlying chip's can_sleep, but under that lock it calls config and
> direction ops that reach sleeping pinctrl paths. On a controller with
> non-sleeping MMIO value ops the lock is a spinlock, so a sleeping call
> runs from atomic context:
>
> BUG: sleeping function called from invalid context
> ... pinctrl_gpio_set_config <- gpiochip_generic_config
> <- gpio_shared_proxy_set_config (voting spinlock held)
> <- ... <- mmc_pwrseq_simple_probe
>
> [...]

There are no build-time dependencies between this and 2/2 so let me queue this
for fixes on its own and Linus W can take 2/2.

[1/2] gpio: shared-proxy: always serialize with a sleeping mutex
https://git.kernel.org/brgl/c/efecde8a254d1f207b75c5ebcfba2c51f4c771d9

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