Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Adrian Ambrozewicz <aambrozewicz@nvidia.com>
To: Zqiang <qiang.zhang@linux.dev>
Cc: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: Use srcu_barrier() instead of synchronize_srcu() in gpiodev_release()
Date: Fri, 27 Nov 2026 09:09:11 +0200	[thread overview]
Message-ID: <20261127070910.668333-2-aambrozewicz@nvidia.com> (raw)
In-Reply-To: <20261127023101.27568-1-qiang.zhang@linux.dev>

On Fri, Nov 27, 2026 at 10:31:01AM +0800, Zqiang wrote:
> The gpio_desc_label object are freed asynchronously via call_srcu() on
> gdev->desc_srcu (see desc_set_label()). to drain these pending SRCU
> callbacks before cleanup the SRCU structure, gpiodev_release() currently
> calls synchronize_srcu(&gdev->desc_srcu).

[...]

>  	/* Call pending kfree()s for descriptor labels. */
> -	synchronize_srcu(&gdev->desc_srcu);
> +	srcu_barrier(&gdev->desc_srcu);
>  	cleanup_srcu_struct(&gdev->desc_srcu);

Hi Zqiang,

Bartosz already has this exact change in gpio/for-current, applied on
2026-11-24 as commit c901e8fddd3a ("gpiolib: wait for pending label
frees before cleaning up desc_srcu"):

https://git.kernel.org/brgl/c/c901e8fddd3a23353bb12c9d93b9a5fc482ac8f5

It carries Fixes: a86d27693066 and Cc: stable.

Thanks,
Adrian

  parent reply	other threads:[~2026-11-27  7:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  2:31 [PATCH] gpiolib: Use srcu_barrier() instead of synchronize_srcu() in gpiodev_release() Zqiang
2026-11-27  2:41 ` sashiko-bot
2026-11-27  7:09 ` Adrian Ambrozewicz [this message]
2026-11-27 11:39   ` Zqiang
  -- strict thread matches above, loose matches on Subject: below --
2026-11-26  8:42 Zqiang
2026-11-26  8:52 ` sashiko-bot

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=20261127070910.668333-2-aambrozewicz@nvidia.com \
    --to=aambrozewicz@nvidia.com \
    --cc=brgl@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang.zhang@linux.dev \
    /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