[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <pq6di5nia7kcdiqsitcr6p42r4jyejzlr4wzqsmz3hes5igcy6@3r3inhvwozga>
Date: Fri, 28 Nov 2025 00:08:55 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] gpio: shared: fix a deadlock
On Thu, Nov 27, 2025 at 10:53:56AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> It's possible that the auxiliary proxy device we add when setting up the
> GPIO controller exposing shared pins, will get matched and probed
> immediately. The gpio-proxy-driver will then retrieve the shared
> descriptor structure. That will cause a recursive mutex locking and
> a deadlock because we're already holding the gpio_shared_lock in
> gpio_device_setup_shared() and try to take it again in
> devm_gpiod_shared_get() like this:
>
>
> Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
> Closes: https://lore.kernel.org/all/fimuvblfy2cmn7o4wzcxjzrux5mwhvlvyxfsgeqs6ore2xg75i@ax46d3sfmdux/
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> ---
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Thanks!
--
With best wishes
Dmitry
Powered by blists - more mailing lists