]> git.hungrycats.org Git - linux/commitdiff
ksmbd: smbd: fix connection dropped issue
authorHyunchul Lee <hyc.lee@gmail.com>
Tue, 17 May 2022 21:46:08 +0000 (06:46 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:36 +0000 (18:41 +0200)
[ 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 <wiz.chen@gmail.com>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Tested-by: Yufan Chen <wiz.chen@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ksmbd/transport_rdma.c

index ba5a22bc2e6d8d31c286716d128ef4ecb8bc12f2..d3b60b833a81652cbe0d7a8412b407219c98bbf3 100644 (file)
@@ -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;