Re: [PATCH v5 0/9] nvmem: rework nvmem core and allow unbinding with active consumers
From: Srinivas Kandagatla
Date: Wed Jul 08 2026 - 16:27:52 EST
On Mon, 29 Jun 2026 11:47:45 +0200, Bartosz Golaszewski wrote:
> Sashiko pointed out some issues so this iteration fixes them. I'm also
> Cc'ing Loic who seems to have encountered the issue of unbinding with
> active consumers when working on the block nvmem provider.
>
> Nvmem is one of the subsystems vulnerable to object life-time issues.
> The memory nvmem core dereferences is owned by nvmem providers which can
> be unbound at any time and even though nvmem devices themselves are
> reference-counted, there's no synchronization with the provider modules.
>
> [...]
Applied, thanks!
[1/9] nvmem: remove unused field from struct nvmem_device
commit: 5409a299432b54f33fc47cb182df5e8b8166031c
[2/9] nvmem: return -EOPNOTSUPP to in-kernel users on missing callbacks
commit: c6c4594fc8c139a533a0e0b05727009911b06157
[3/9] nvmem: check the return value of gpiod_set_value_cansleep()
commit: b25b0a566a91d2a3a38a27329b7d6034a08ad9df
[4/9] nvmem: simplify locking with guard()
commit: 376bc6403ac53e833014b4e834465ea5aec15de0
[5/9] nvmem: remove unneeded __nvmem_device_put()
commit: fb564b9150b4271b6de24a7b38c320c538c7c9f5
[6/9] nvmem: split out the reg_read/write() callbacks out of struct nvmem_device
commit: 15dcb6cc98a5c5011124b0dc62869ed6609381b8
[7/9] nvmem: simplify nvmem_sysfs_remove_compat()
commit: 9e81282a54bbc091c9e98d7eb3b1b5c247295dc0
[8/9] nvmem: remove duplicated reference counting
commit: 0c0e7756ec1b5a1b76c9b196508b421881b77c3f
[9/9] nvmem: protect nvmem_device::ops with SRCU
commit: ea87821719eea4cf729e237e5cc417172f8b58e3
Best regards,
--
Srinivas Kandagatla <srini@xxxxxxxxxx>