Re: [PATCH v2] smb3: Replace smb2pdu 1-element arrays with flex-arrays
From: Namjae Jeon
Date: Thu Feb 16 2023 - 09:25:37 EST
Hi Kees,
> /* Read flags */
> @@ -730,7 +730,7 @@ struct smb2_read_rsp {
> __le32 DataLength;
> __le32 DataRemaining;
> __le32 Flags;
> - __u8 Buffer[1];
> + __u8 Buffer[];
> } __packed;
>
You seem to have missed -1 removal in the code below.
./fs/cifs/smb2ops.c:5632: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/cifs/smb2ops.c:5654: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/cifs/smb2ops.c:5675: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/cifs/smb2ops.c:5696: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/cifs/smb2ops.c:5717: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/cifs/smb2ops.c:5738: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/cifs/smb2ops.c:5759: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/ksmbd/smb2ops.c:29: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/ksmbd/smb2ops.c:55: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/ksmbd/smb2ops.c:82: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
./fs/ksmbd/smb2ops.c:109: .read_rsp_size = sizeof(struct
smb2_read_rsp) - 1,
thanks.