From: Maurizio Lombardi <mlombard@redhat.com>
To: kbusch@kernel.org
Cc: linux-nvme@lists.infradead.org, hare@suse.de, sagi@grimberg.me,
mlombard@arkamax.eu
Subject: [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
Date: Mon, 16 Mar 2026 17:44:41 +0100 [thread overview]
Message-ID: <20260316164441.180393-1-mlombard@redhat.com> (raw)
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>
---
drivers/nvme/target/tcp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index acc71a26733f..ce497843b979 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1667,6 +1667,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:
--
2.53.0
next reply other threads:[~2026-03-16 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 16:44 Maurizio Lombardi [this message]
2026-03-26 16:44 ` [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change Maurizio Lombardi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260316164441.180393-1-mlombard@redhat.com \
--to=mlombard@redhat.com \
--cc=hare@suse.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=mlombard@arkamax.eu \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox