summaryrefslogtreecommitdiff
path: root/net/lapb
diff options
context:
space:
mode:
authorMarios Makassikis <mmakassikis@freebox.fr>2024-12-14 06:17:23 +0300
committerSteve French <stfrench@microsoft.com>2024-12-16 07:20:03 +0300
commit43fb7bce8866e793275c4f9f25af6a37745f3416 (patch)
tree906cf759ba4d4b63de28b7b0bd0ea0f7b0b2bee2 /net/lapb
parent83c47d9e0ce79b5d7c0b21b9f35402dbde0fa15c (diff)
downloadlinux-43fb7bce8866e793275c4f9f25af6a37745f3416.tar.xz
ksmbd: fix broken transfers when exceeding max simultaneous operations
Since commit 0a77d947f599 ("ksmbd: check outstanding simultaneous SMB operations"), ksmbd enforces a maximum number of simultaneous operations for a connection. The problem is that reaching the limit causes ksmbd to close the socket, and the client has no indication that it should have slowed down. This behaviour can be reproduced by setting "smb2 max credits = 128" (or lower), and transferring a large file (25GB). smbclient fails as below: $ smbclient //192.168.1.254/testshare -U user%pass smb: \> put file.bin cli_push returned NT_STATUS_USER_SESSION_DELETED putting file file.bin as \file.bin smb2cli_req_compound_submit: Insufficient credits. 0 available, 1 needed NT_STATUS_INTERNAL_ERROR closing remote file \file.bin smb: \> smb2cli_req_compound_submit: Insufficient credits. 0 available, 1 needed Windows clients fail with 0x8007003b (with smaller files even). Fix this by delaying reading from the socket until there's room to allocate a request. This effectively applies backpressure on the client, so the transfer completes, albeit at a slower rate. Fixes: 0a77d947f599 ("ksmbd: check outstanding simultaneous SMB operations") Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'net/lapb')
0 files changed, 0 insertions, 0 deletions