summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorQing Zhang <diasyzhang@tencent.com>2026-10-23 19:29:28 +0800
committerKeith Busch <kbusch@kernel.org>2026-10-28 08:11:22 -0700
commitcead6beb89256ae7145b65fbe8e8a5fedba4a47c (patch)
tree8ccf6544934268959d6a91efb99e7de1787a3198 /tools/lib/python/kdoc
parenta563f13a54efb5662627743ef56b3d5f87ef6045 (diff)
nvmet: protect nvmet_ports_list with nvmet_config_sem
Readers of nvmet_ports_list (e.g. nvmet_subsys_disc_changed()) hold nvmet_config_sem and assert it via lockdep. The writers -- nvmet_ports_make() and nvmet_port_release() -- do not take the lock; they rely on the parent directory's VFS inode lock for serialization, which is an implementation detail of configfs and not a guaranteed contract. Align the writers with the lock the readers already require. Also move list_add() in nvmet_ports_make() to after the port is fully initialized: the old position published the port on the global list before INIT_LIST_HEAD(&port->subsystems), so a concurrent reader could traverse uninitialized list heads. flush_workqueue() in nvmet_port_release() stays outside the semaphore to avoid a lock dependency on nvmet_wq. Fixes: b662a078576e ("nvmet: enable Discovery Controller AENs") Reviewed-by: Maurizio Lombardi <mlombard@redhat.com> Signed-off-by: Qing Zhang <diasyzhang@tencent.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions