[PATCH v2] nvmet-tcp: check return value of nvmet_tcp_set_queue_sock

Keith Busch kbusch at kernel.org
Wed May 27 07:51:55 PDT 2026


On Tue, May 26, 2026 at 05:28:05PM +0800, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang at kylinos.cn>
> 
> The return value of nvmet_tcp_set_queue_sock() is currently ignored in
> nvmet_tcp_tls_handshake_done(). If it fails (e.g., due to the socket
> not being in TCP_ESTABLISHED state), the socket callbacks will not be
> properly set, leading to queue and socket leakage.
> 
> Fix this by capturing the return value and calling
> nvmet_tcp_schedule_release_queue() on failure to ensure proper cleanup.

Thanks, applied to nvme-7.2.



More information about the Linux-nvme mailing list