Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: Re: [PATCH] gpio: shared: shorten the critical section in gpiochip_setup_shared()
Date: Mon, 30 Mar 2026 09:51:31 +0200	[thread overview]
Message-ID: <177485708802.5892.11250894850372032857.b4-ty@oss.qualcomm.com> (raw)
In-Reply-To: <20260325-gpio-shared-deadlock-v1-1-e4e7a5319e95@oss.qualcomm.com>


On Wed, 25 Mar 2026 12:06:38 +0100, Bartosz Golaszewski wrote:
> Commit 710abda58055 ("gpio: shared: call gpio_chip::of_xlate() if set")
> introduced a critical section around the adjustmenet of entry->offset.
> However this may cause a deadlock if we create the auxiliary shared
> proxy devices with this lock taken. We only need to protect
> entry->offset while it's read/written so shorten the critical section
> and release the lock before creating the proxy device as the field in
> question is no longer accessed at this point.
> 
> [...]

Applied, thanks!

[1/1] gpio: shared: shorten the critical section in gpiochip_setup_shared()
      https://git.kernel.org/brgl/c/310a4a9cbb17037668ea440f6a3964d00705b400

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

      reply	other threads:[~2026-03-30  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 11:06 [PATCH] gpio: shared: shorten the critical section in gpiochip_setup_shared() Bartosz Golaszewski
2026-03-30  7:51 ` Bartosz Golaszewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=177485708802.5892.11250894850372032857.b4-ty@oss.qualcomm.com \
    --to=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=jonathanh@nvidia.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).