From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CB0EC6FA8B for ; Fri, 16 Sep 2022 10:15:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231406AbiIPKPY (ORCPT ); Fri, 16 Sep 2022 06:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbiIPKOC (ORCPT ); Fri, 16 Sep 2022 06:14:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 260B6AE872; Fri, 16 Sep 2022 03:10:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 38E9062A09; Fri, 16 Sep 2022 10:10:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB123C433D6; Fri, 16 Sep 2022 10:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663323022; bh=PHg8TP2ivrzlT0uLMEYPZheBZrjwK7FNCKdBeLRWa4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kK6Pychb4A+ei4agARVsvKo+MxI+GQjdSAD/2jVvfG/FjE3PToWTBVTpUiRHk4Lqw cQua5KEvX1HREOWWIRUrRz4I8o4/EJD4gOo+Vr9N/8jKVWboaGCX2Cdbybxq0XLxpZ YXKeHvhzYacc32yMr1RxKUa4RIw1CKNPlRF16SqQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maurizio Lombardi , Sagi Grimberg , Chaitanya Kulkarni , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 14/24] nvmet-tcp: fix unhandled tcp states in nvmet_tcp_state_change() Date: Fri, 16 Sep 2022 12:08:39 +0200 Message-Id: <20220916100445.996689041@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100445.354452396@linuxfoundation.org> References: <20220916100445.354452396@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maurizio Lombardi [ Upstream commit 478814a5584197fa1fb18377653626e3416e7cd6 ] TCP_FIN_WAIT2 and TCP_LAST_ACK were not handled, the connection is closing so we can ignore them and avoid printing the "unhandled state" warning message. [ 1298.852386] nvmet_tcp: queue 2 unhandled state 5 [ 1298.879112] nvmet_tcp: queue 7 unhandled state 5 [ 1298.884253] nvmet_tcp: queue 8 unhandled state 5 [ 1298.889475] nvmet_tcp: queue 9 unhandled state 5 v2: Do not call nvmet_tcp_schedule_release_queue(), just ignore the fin_wait2 and last_ack states. Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/target/tcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index d030d5e69dc50..e3e35b9bd6846 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -1471,6 +1471,9 @@ static void nvmet_tcp_state_change(struct sock *sk) goto done; switch (sk->sk_state) { + case TCP_FIN_WAIT2: + case TCP_LAST_ACK: + break; case TCP_FIN_WAIT1: case TCP_CLOSE_WAIT: case TCP_CLOSE: -- 2.35.1