]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: fix outstanding credits related bugs
authorHyunchul Lee <hyc.lee@gmail.com>
Fri, 20 May 2022 05:35:47 +0000 (14:35 +0900)
committerSteve French <stfrench@microsoft.com>
Sat, 21 May 2022 20:01:43 +0000 (15:01 -0500)
commit9f23b18bdb173030409cc376469c8961a2685319
treee73600c8088b056ae689bbd7c2eacd419dd02aec
parentbb778910256f303c14b4e7297018aff9a7bd55f9
ksmbd: fix outstanding credits related bugs

outstanding credits must be initialized to 0,
because it means the sum of credits consumed by
in-flight requests.
And outstanding credits must be compared with
total credits in smb2_validate_credit_charge(),
because total credits are the sum of credits
granted by ksmbd.

This patch fix the following error,
while frametest with Windows clients:

Limits exceeding the maximum allowable outstanding requests,
given : 128, pending : 8065

Fixes: 904211611dac ("ksmbd: limits exceeding the maximum allowable outstanding requests")
Cc: stable@vger.kernel.org
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>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/connection.c
fs/ksmbd/smb2misc.c
fs/ksmbd/smb_common.c