diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-09-25 11:52:17 +0200 |
|---|---|---|
| committer | Srinivas Kandagatla <srini@kernel.org> | 2026-09-25 11:52:03 +0100 |
| commit | d30804cbeea7ebb6277badc8d6210af5383ac1a4 (patch) | |
| tree | 3ff5cefe7b72ea42e8400fa94c4fe476619631e3 /tools/perf/scripts/python | |
| parent | f2928a7103008f27fff6340c161817faffa7d390 (diff) | |
| download | linux-next-d30804cbeea7ebb6277badc8d6210af5383ac1a4.tar.gz linux-next-d30804cbeea7ebb6277badc8d6210af5383ac1a4.zip | |
nvmem: protect nvmem_device::ops with SRCU
With the provider-owned data split out into a separate 'ops' structure,
we can now protect it with SRCU.
Protect all dereferences of nvmem->ops with an SRCU read lock.
Synchronize SRCU in nvmem_unregister() after setting the implementation
pointer to NULL. This has the effect of numbing down the device after
nvmem_unregister() returns - it will no longer accept any consumer calls
and return -ENODEV. The actual device will live on for as long as there
are references to it but we will no longer reach into the consumer's
memory which may be gone by this time.
Nvmem cell entries are destroyed in .release() now as they may be still
dereferenced via the nvmem_cell handles after nvmem_release(). The
actual calls will still go through SRCU and fail with -ENODEV if the
provider is gone.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
