public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change
@ 2026-03-16 16:44 Maurizio Lombardi
  2026-03-26 16:44 ` Maurizio Lombardi
  0 siblings, 1 reply; 2+ messages in thread
From: Maurizio Lombardi @ 2026-03-16 16:44 UTC (permalink / raw)
  To: kbusch; +Cc: linux-nvme, hare, sagi, mlombard

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-26 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 16:44 [PATCH] nvmet-tcp: handle TCP_CLOSING state in nvmet_tcp_state_change Maurizio Lombardi
2026-03-26 16:44 ` Maurizio Lombardi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox