]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: fix credit count leakage
authorNamjae Jeon <linkinjeon@kernel.org>
Fri, 12 May 2023 14:29:12 +0000 (23:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:48:24 +0000 (10:48 +0200)
commiteff55712c34cf405b810ebf66e76ad764c21140d
treef7abd06203295a617f4eedfcfdac6ea3073cd147
parent36461b145ed863845494416a1c8ef727df9df114
ksmbd: fix credit count leakage

commit 84c5aa47925a1f40d698b6a6a2bf67e99617433d upstream.

This patch fix the failure from smb2.credits.single_req_credits_granted
test. When client send 8192 credit request, ksmbd return 8191 credit
granted. ksmbd should give maximum possible credits that must be granted
within the range of not exceeding the max credit to client.

Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2pdu.c