diff options
| author | Chris Mason <mason@kernel.org> | 2026-10-28 10:42:41 -0600 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-10-28 11:41:43 -0700 |
| commit | 89480d137bf0d943a82c64f86ae2407a15276b5e (patch) | |
| tree | dc9253b07face37d432622208d9875061450ac31 /tools/lib/python | |
| parent | f1dac2a2e75260d1466d9f03ccf0944d6d0449a4 (diff) | |
nvmet: don't clear sq->ctrl for a Connect with sqsize 0
nvmet_install_queue() checks sqsize first and jumps to err on zero,
where sq->ctrl is set to NULL. Since commit b71df12605ca the cmpxchg()
that sets sq->ctrl comes after the checks, so err now undoes a bind
that this call never made. Over RDMA a host can send two Connects
together and the second is parsed before the first executes, so a
second Connect with sqsize 0 clears the sq->ctrl the first one set.
The reference it held is never dropped and the controller leaks, with
its cntlid, until reboot. The discovery subsystem lets any host do
that, 20 connections leak around 10 controllers. A pending AER on such
a queue hangs nvmet_sq_destroy() forever, and a queue can keep its
"authenticated" mark across a rebind.
Return the status directly, as the two checks after it do, so err is
only reached after this call's cmpxchg() succeeded.
Fixes: b71df12605ca ("nvmet: avoid duplicate qid in connect cmd")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Chris Mason <mason@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
