]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
authorMaurizio Lombardi <mlombard@redhat.com>
Mon, 16 Mar 2026 16:44:41 +0000 (17:44 +0100)
committerKeith Busch <kbusch@kernel.org>
Wed, 10 Jun 2026 15:14:19 +0000 (08:14 -0700)
When an NVMe/TCP connection shuts down, the underlying TCP socket can
enter the TCP_CLOSING state (state 11).  Currently, the
nvmet_tcp_state_change() callback does not explicitly handle this state,
which results in harmless but noisy kernel warnings:

nvmet_tcp: queue 2 unhandled state 11

Add TCP_CLOSING to the switch statement alongside TCP_FIN_WAIT2 and
TCP_LAST_ACK to silently ignore the state transition.

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/tcp.c

index 3568fa9a09053d5f7fb5db930f974d7b15bb0371..08140f2476d2026d90cb265445ec0e28c73dacf0 100644 (file)
@@ -1678,6 +1678,7 @@ static void nvmet_tcp_state_change(struct sock *sk)
        switch (sk->sk_state) {
        case TCP_FIN_WAIT2:
        case TCP_LAST_ACK:
+       case TCP_CLOSING:
                break;
        case TCP_FIN_WAIT1:
        case TCP_CLOSE_WAIT: