From: Hyunchul Lee Date: Tue, 17 May 2022 21:46:08 +0000 (+0900) Subject: ksmbd: smbd: fix connection dropped issue X-Git-Tag: v5.19-rc1~78^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5366afc4065075a4456941fbd51c33604d631ee5;p=thirdparty%2Fkernel%2Flinux.git ksmbd: smbd: fix connection dropped issue 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 --- diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c index 0741fd129d166..e91acc2746bcd 100644 --- a/fs/ksmbd/transport_rdma.c +++ b/fs/ksmbd/transport_rdma.c @@ -576,6 +576,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;