diff options
| author | Shao Mingyin <shao.mingyin@zte.com.cn> | 2026-11-04 03:07:25 +0800 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-11-05 08:53:00 -0800 |
| commit | 6d7388d1097f6b2367026114ce8d9e7b8b9d3426 (patch) | |
| tree | af5320504a32362cbfb6cc78a454d57b4d06378b /tools/perf/scripts/python | |
| parent | 8a0449832b50cd4f99f2d2952cfc1476e5f26d0f (diff) | |
nvmet: take subsys->lock when forcing reconnects for tbkas
nvmet_subsys_attr_tbkas_store() walks subsys->ctrls to force a reconnect
while holding only nvmet_config_sem. The list is protected by
subsys->lock: nvmet_alloc_ctrl() adds entries and nvmet_ctrl_free()
removes them under that lock, and the controller free path does not take
nvmet_config_sem. Writing attr_tbkas concurrently with a controller
going away, for example on a keep-alive timeout or a fatal error, can
therefore dereference a controller that has already been removed and
freed.
Take subsys->lock around the list walk, as
nvmet_subsys_attr_qid_max_store() already does for the same loop.
delete_ctrl() only schedules the asynchronous teardown, so it does not
recurse into subsys->lock.
Fixes: e98e45e9465b ("nvmet: Add traffic based keep alive support to configfs")
Cc: stable@vger.kernel.org
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
