diff mbox series

[1/2] cifs: fix computation for MAX_SMB2_HDR_SIZE

Message ID 20190129024617.21615-2-lsahlber@redhat.com (mailing list archive)
State New, archived
Headers show
Series cifs: fix header sizes | expand

Commit Message

Ronnie Sahlberg Jan. 29, 2019, 2:46 a.m. UTC
The size of the fixed part of the create response is 88 bytes not 56.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 fs/cifs/smb2pdu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Pavel Shilovsky Jan. 29, 2019, 5:54 p.m. UTC | #1
пн, 28 янв. 2019 г. в 18:57, Ronnie Sahlberg <lsahlber@redhat.com>:
>
> The size of the fixed part of the create response is 88 bytes not 56.
>
> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> ---
>  fs/cifs/smb2pdu.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
> index 05dea6750c33..42381b0c4bd2 100644
> --- a/fs/cifs/smb2pdu.h
> +++ b/fs/cifs/smb2pdu.h
> @@ -84,8 +84,8 @@
>
>  #define NUMBER_OF_SMB2_COMMANDS        0x0013
>
> -/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */
> -#define MAX_SMB2_HDR_SIZE 0x00b0
> +/* 52 transform hdr + 64 hdr + 88 create rsp */
> +#define MAX_SMB2_HDR_SIZE 204
>
>  #define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe)
>  #define SMB2_TRANSFORM_PROTO_NUM cpu_to_le32(0x424d53fd)
> --
> 2.13.6
>

Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>

The previous version of the patch is worth stable, I think.

--
Best regards,
Pavel Shilovsky
diff mbox series

Patch

diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h
index 05dea6750c33..42381b0c4bd2 100644
--- a/fs/cifs/smb2pdu.h
+++ b/fs/cifs/smb2pdu.h
@@ -84,8 +84,8 @@ 
 
 #define NUMBER_OF_SMB2_COMMANDS	0x0013
 
-/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */
-#define MAX_SMB2_HDR_SIZE 0x00b0
+/* 52 transform hdr + 64 hdr + 88 create rsp */
+#define MAX_SMB2_HDR_SIZE 204
 
 #define SMB2_PROTO_NUMBER cpu_to_le32(0x424d53fe)
 #define SMB2_TRANSFORM_PROTO_NUM cpu_to_le32(0x424d53fd)