summaryrefslogtreecommitdiffstats
path: root/fs/ksmbd/smb2pdu.c
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2021-12-31 09:26:25 +0900
committerSteve French <stfrench@microsoft.com>2022-01-10 12:44:19 -0600
commitb589f5db6d4af8f14d70e31e1276b4c017668a26 (patch)
treed5d2850a5a54c553245e40435576b89da8d19008 /fs/ksmbd/smb2pdu.c
parent914d7e5709ac59ded70bea7956d408fe2acd7c3c (diff)
downloadlinux-b589f5db6d4af8f14d70e31e1276b4c017668a26.tar.bz2
ksmbd: limits exceeding the maximum allowable outstanding requests
If the client ignores the CreditResponse received from the server and continues to send the request, ksmbd limits the requests if it exceeds smb2 max credits. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/smb2pdu.c')
-rw-r--r--fs/ksmbd/smb2pdu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index 706191f5e475..867ed982f729 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -322,6 +322,7 @@ int smb2_set_rsp_credits(struct ksmbd_work *work)
}
conn->total_credits -= credit_charge;
+ conn->outstanding_credits -= credit_charge;
credits_requested = max_t(unsigned short,
le16_to_cpu(req_hdr->CreditRequest), 1);