[PATCH 0/2] nvme: add reference counting for transport modules
Nilay Shroff
nilay at linux.ibm.com
Mon Aug 31 08:19:53 PDT 2026
Hi,
This patchset adds reference counting for NVMe transport modules while
the corresponding multipath head node is open. This prevents the
underlying transport module from being unloaded while it is still in
use by the multipath head node. Unloading a transport module while it
is still in use can result in undefined behavior.
The second patch adds a Clang context annotation for the shared field
used to track the number of active head node openers, allowing the
Clang context analyzer to validate accesses to the field.
As usual, feedback and suggestions are welcome.
Thanks!
Nilay Shroff (2):
nvme: keep transport module referenced while head node is open
nvme: add context annotation for nvme_ns_head::nr_openers
drivers/nvme/host/core.c | 11 +++++++++--
drivers/nvme/host/multipath.c | 37 +++++++++++++++++++++++++++++++++--
drivers/nvme/host/nvme.h | 33 +++++++++++++++++++++++++++++++
3 files changed, 77 insertions(+), 4 deletions(-)
--
2.53.0
More information about the Linux-nvme
mailing list