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 C9BCFCCA495 for ; Tue, 7 Jun 2022 18:47:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354403AbiFGSq7 (ORCPT ); Tue, 7 Jun 2022 14:46:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352181AbiFGSQ5 (ORCPT ); Tue, 7 Jun 2022 14:16:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C6D911C2D; Tue, 7 Jun 2022 10:50:58 -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 DB49E616A3; Tue, 7 Jun 2022 17:50:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F18FC385A5; Tue, 7 Jun 2022 17:50:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654624257; bh=Hcs8FT5zKCSoZoDm28Ri/cAMUxhfgMLbbzBG4k2m+vI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IQnYIQQZQkGSin+q9A+KZF//jlqHpnb8++uqsy8u8c7qA6tP5VPqWtMH0uUYoM+EY ZRn4ipH7YH2b3IHH1aPBaK51PU7dbHltTsII7B/oZ5AH1xm8G0Vj8/Jy8UI9QGMGuf 81NrKIM1PyYIXRymU/bffJD+rf1XEoq5ggHWsUg1/coVtYyssA2XpbrGjx1NQ//a4A AsixDphU7MysREzI913wCTDuV7z317Kx5Elbk5ftXp6TntKkULmjqaVoyRns0B5j+E CHbjoAOOALDkjYd56Y9IhuCuImbvgXOqLAs0GeFtfh1lrGvl0EOD1Zx23GCUzXNgOC ot+q9ocXburjg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hyunchul Lee , Yufan Chen , Namjae Jeon , Steve French , Sasha Levin , sfrench@samba.org, linux-cifs@vger.kernel.org Subject: [PATCH AUTOSEL 5.18 34/68] ksmbd: smbd: fix connection dropped issue Date: Tue, 7 Jun 2022 13:48:00 -0400 Message-Id: <20220607174846.477972-34-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220607174846.477972-1-sashal@kernel.org> References: <20220607174846.477972-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hyunchul Lee [ Upstream commit 5366afc4065075a4456941fbd51c33604d631ee5 ] When there are bursty connection requests, RDMA connection event handler is deferred and Negotiation requests are received even if connection status is NEW. To handle it, set the status to CONNECTED if Negotiation requests are received. Reported-by: Yufan Chen Signed-off-by: Hyunchul Lee Tested-by: Yufan Chen Acked-by: Namjae Jeon Signed-off-by: Steve French Signed-off-by: Sasha Levin --- fs/ksmbd/transport_rdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c index e646d79554b8..3f5d13571694 100644 --- a/fs/ksmbd/transport_rdma.c +++ b/fs/ksmbd/transport_rdma.c @@ -569,6 +569,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc) } t->negotiation_requested = true; t->full_packet_received = true; + t->status = SMB_DIRECT_CS_CONNECTED; enqueue_reassembly(t, recvmsg, 0); wake_up_interruptible(&t->wait_status); break; -- 2.35.1