From: Srinivas Kandagatla <srini@kernel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: linux-kernel@vger.kernel.org, brgl@kernel.org
Subject: Re: [PATCH v2] nvmem: don't use devres in subsystem code
Date: Tue, 01 Dec 2026 13:48:42 +0000 [thread overview]
Message-ID: <179613292258.204569.7322505793890456807.b4-ty@kernel.org> (raw)
In-Reply-To: <20261028-nvmem-no-devm-in-core-v2-1-8ad001474cc4@oss.qualcomm.com>
On Wed, 28 Oct 2026 12:33:08 +0100, Bartosz Golaszewski wrote:
> Using device-managed APIs at sub-system level can cause issues due to
> lack of a strict API contract, especially when relying on managed
> resources being freed on device release. Devres should only be used in
> drivers, ideally only when it's bound to a driver.
>
> In nvmem, the release of the memory allocated for sysfs attributes,
> happens when the last reference to nvmem->dev is dropped, not in
> nvmem_unregister(). This means that consumer holding references to nvmem
> devices keep the memory around after sysfs files are gone which happens
> in device_del().
>
> [...]
Applied, thanks!
[1/1] nvmem: don't use devres in subsystem code
commit: 96139b973a2a51bdbf230fc95c015afe41830072
Best regards,
--
Srinivas Kandagatla <srini@kernel.org>
prev parent reply other threads:[~2026-12-01 13:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 11:33 Bartosz Golaszewski
2026-12-01 13:48 ` Srinivas Kandagatla [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=179613292258.204569.7322505793890456807.b4-ty@kernel.org \
--to=srini@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@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
all inboxes | Powered by JetHome®