diff mbox series

[2/2] ksmbd: smbd: fix connection dropped issue

Message ID 20220517214608.283538-2-hyc.lee@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ksmbd: fix outstanding credits related bugs | expand

Commit Message

Hyunchul Lee May 17, 2022, 9:46 p.m. UTC
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.

Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Reported-by: Yufan Chen <wiz.chen@gmail.com>
Tested-by: Yufan Chen <wiz.chen@gmail.com>
---
 fs/ksmbd/transport_rdma.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Namjae Jeon May 20, 2022, 12:21 a.m. UTC | #1
2022-05-18 6:46 GMT+09:00, Hyunchul Lee <hyc.lee@gmail.com>:
> 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.
>
> Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
> Reported-by: Yufan Chen <wiz.chen@gmail.com>
> Tested-by: Yufan Chen <wiz.chen@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>

Thanks!
diff mbox series

Patch

diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c
index 0741fd129d16..e91acc2746bc 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;