]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nvmet-tcp: Don't free SQ on authentication success
authorAlistair Francis <alistair.francis@wdc.com>
Tue, 2 Dec 2025 05:17:53 +0000 (15:17 +1000)
committerKeith Busch <kbusch@kernel.org>
Fri, 27 Mar 2026 14:35:03 +0000 (07:35 -0700)
commit2e6eb6b277f593b98f151ea8eff1beb558bbea3b
tree47e4fc3bfdcfb4d1e20d91a6828a93dae73aa9c8
parentecf4d2d883515850ba838df2537ff1c32d0c4217
nvmet-tcp: Don't free SQ on authentication success

Curently after the host sends a REPLACETLSPSK we free the TLS keys as
part of calling nvmet_auth_sq_free() on success. This means when the
host sends a follow up REPLACETLSPSK we return CONCAT_MISMATCH as the
check for !nvmet_queue_tls_keyid(req->sq) fails.

This patch ensures we don't free the TLS key on success as we might need
it again in the future.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/fabrics-cmd-auth.c