]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: add indatalen that can be a non-zero value to calculation of credit charge...
authorNamjae Jeon <namjae.jeon@samsung.com>
Thu, 11 Jun 2020 02:21:19 +0000 (11:21 +0900)
committerSteve French <stfrench@microsoft.com>
Fri, 12 Jun 2020 11:20:17 +0000 (06:20 -0500)
commit46f61d0117033a4551b0a34764efd8c4f27a6238
tree25c2bc0e89c4b593b31439d4789aeab4886279c2
parentcd9e2938f7e5393efce21f94099b64555cf1e168
smb3: add indatalen that can be a non-zero value to calculation of credit charge in smb2 ioctl

Some of tests in xfstests failed with cifsd kernel server since commit
c1d08b51dc29. cifsd kernel server validates credit charge from client
by calculating it base on max((InputCount + OutputCount) and
(MaxInputResponse + MaxOutputResponse)) according to specification.

MS-SMB2 specification describe credit charge calculation of smb2 ioctl :

If Connection.SupportsMultiCredit is TRUE, the server MUST validate
CreditCharge based on the maximum of (InputCount + OutputCount) and
(MaxInputResponse + MaxOutputResponse), as specified in section 3.3.5.2.5.
If the validation fails, it MUST fail the IOCTL request with
STATUS_INVALID_PARAMETER.

This patch add indatalen that can be a non-zero value to calculation of
credit charge in SMB2_ioctl_init().

Fixes: c1d08b51dc29 ("smb3: fix incorrect number of credits when ioctl
MaxOutputResponse > 64K")
Cc: Stable <stable@vger.kernel.org>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Cc: Steve French <smfrench@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c