From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>,
"Srinivas Kandagatla" <srini@kernel.org>,
"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>,
"Michael Walle" <mwalle@kernel.org>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Michael Walle" <michael@walle.cc>,
"Linus Walleij" <linusw@kernel.org>,
"Khouloud Touil" <ktouil@baylibre.com>,
"Bartosz Golaszewski" <brgl@kernel.org>
Cc: "Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Paul Cercueil" <paul@crapouillou.net>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2 04/11] nvmem: release write protection when the provider disconnects
Date: Thu, 19 Nov 2026 16:52:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-223589@kernel.org> (raw)
In-Reply-To: <20261119-submit-nvmem-provider-lifetime-v1-v2-4-8fca3ec5f18c@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] nvmem: inaccurate Fixes trailer in commit message for wp_gpio
release
--
commit 02c6a5d986a679decc94c88b75af03c4912c7f6d
Author: James Hilliard <james.hilliard1@gmail.com>
> nvmem: release write protection when the provider disconnects
>
> Retained NVMEM consumers keep the device allocation alive after unregister.
> Keeping the write-protect GPIO until final device release prevents a
> replacement provider from requesting the same GPIO.
>
> Release it after draining provider callbacks, when no write can still
> use it. Do this for registration failures as well as unregister.
>
> Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[Severity: Low]
Does the Fixes tag point to the commit that actually caused wp_gpio to
remain acquired across nvmem_unregister()?
Commit 2a127da461a9 ("nvmem: add support for the write-protect pin") did
not release wp_gpio at all; commit a9c3766cb19c ("nvmem: release the
write-protect pin") later added gpiod_put(nvmem->wp_gpio) to
nvmem_release(). At that point nvmem_unregister() only dropped
nvmem->refcnt, so device unregistration waited for all consumers. It was
commit 87341c4dd5de ("nvmem: remove duplicated reference counting") and
commit 6a7b4134fb7a ("nvmem: protect nvmem_device::ops with SRCU") that
changed nvmem_unregister() to immediately unregister and disconnect the
provider while leaving gpiod_put(nvmem->wp_gpio) in nvmem_release().
Should this instead use:
Fixes: 6a7b4134fb7a ("nvmem: protect nvmem_device::ops with SRCU")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119-submit-nvmem-provider-lifetime-v1-v2-0-8fca3ec5f18c@gmail.com?part=4
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2026-11-19 16:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 16:41 [PATCH v2 00/11] nvmem: complete provider and layout disconnection James Hilliard
2026-11-19 16:41 ` [PATCH v2 01/11] nvmem: retain the provider node until device release James Hilliard
2026-11-19 16:42 ` [PATCH v2 02/11] nvmem: drain keepout and cell post-processing accesses James Hilliard
2026-11-19 16:42 ` [PATCH v2 03/11] nvmem: exclude disconnected providers from callback admission James Hilliard
2026-11-19 16:42 ` [PATCH v2 04/11] nvmem: release write protection when the provider disconnects James Hilliard
2026-11-19 16:52 ` sashiko-bot [this message]
2026-11-19 16:42 ` [PATCH v2 05/11] nvmem: reference cell entries independently of their provider list James Hilliard
2026-11-19 16:42 ` [PATCH v2 06/11] nvmem: manage cell attributes independently of device resources James Hilliard
2026-11-19 16:42 ` [PATCH v2 07/11] nvmem: distinguish layout cells from provider cells James Hilliard
2026-11-19 16:42 ` [PATCH v2 08/11] nvmem: disconnect cells before removing their layout James Hilliard
2026-11-19 16:42 ` [PATCH v2 09/11] nvmem: disconnect published devices before registration rollback James Hilliard
2026-11-19 16:42 ` [PATCH v2 10/11] nvmem: u-boot-env: propagate cell registration errors James Hilliard
2026-11-19 16:42 ` [PATCH v2 11/11] nvmem: allow providers to specify an explicit NULL owner James Hilliard
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=sashiko-outbox-223589@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.hilliard1@gmail.com \
--cc=ktouil@baylibre.com \
--cc=linusw@kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=paul@crapouillou.net \
--cc=rafal@milecki.pl \
--cc=sashiko-reviews@lists.linux.dev \
--cc=srini@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