diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2023-03-21 15:25:34 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-03-22 16:38:33 -0500 |
commit | be6f42fad5f5fd1fea9d562df82c38ad6ed3bfe9 (patch) | |
tree | f7fff69255f9c2c65d5e765dc49c2da7c8f8d86a /fs/ksmbd/connection.c | |
parent | 2624b445544ffc1472ccabfb6ec867c199d4c95c (diff) | |
download | lwn-be6f42fad5f5fd1fea9d562df82c38ad6ed3bfe9.tar.gz lwn-be6f42fad5f5fd1fea9d562df82c38ad6ed3bfe9.zip |
ksmbd: don't terminate inactive sessions after a few seconds
Steve reported that inactive sessions are terminated after a few
seconds. ksmbd terminate when receiving -EAGAIN error from
kernel_recvmsg(). -EAGAIN means there is no data available in timeout.
So ksmbd should keep connection with unlimited retries instead of
terminating inactive sessions.
Cc: stable@vger.kernel.org
Reported-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/connection.c')
-rw-r--r-- | fs/ksmbd/connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ksmbd/connection.c b/fs/ksmbd/connection.c index 5b10b03800c1..5d914715605f 100644 --- a/fs/ksmbd/connection.c +++ b/fs/ksmbd/connection.c @@ -298,7 +298,7 @@ int ksmbd_conn_handler_loop(void *p) kvfree(conn->request_buf); conn->request_buf = NULL; - size = t->ops->read(t, hdr_buf, sizeof(hdr_buf)); + size = t->ops->read(t, hdr_buf, sizeof(hdr_buf), -1); if (size != sizeof(hdr_buf)) break; @@ -344,7 +344,7 @@ int ksmbd_conn_handler_loop(void *p) * We already read 4 bytes to find out PDU size, now * read in PDU */ - size = t->ops->read(t, conn->request_buf + 4, pdu_size); + size = t->ops->read(t, conn->request_buf + 4, pdu_size, 2); if (size < 0) { pr_err("sock_read failed: %d\n", size); break; |