diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2021-12-31 03:26:25 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-01-10 21:44:19 +0300 |
commit | b589f5db6d4af8f14d70e31e1276b4c017668a26 (patch) | |
tree | d5d2850a5a54c553245e40435576b89da8d19008 /fs/ksmbd/smb2pdu.c | |
parent | 914d7e5709ac59ded70bea7956d408fe2acd7c3c (diff) | |
download | linux-b589f5db6d4af8f14d70e31e1276b4c017668a26.tar.xz |
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.c | 1 |
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); |