Re: [PATCH] fs/cifs: Replace one-element array with flexible-array member.

2021-01-17 Thread Steve French
On Sun, Jan 17, 2021 at 6:02 PM Al Viro wrote: > > On Sun, Jan 17, 2021 at 03:58:23PM -0600, Steve French wrote: > > Jiapeng, > > Aurelien is correct, you should respin this patch and correct for > > where it breaks the sizeof calculation. For example your change: > > > > struct smb2_lock_rsp { >

Re: [PATCH] fs/cifs: Replace one-element array with flexible-array member.

2021-01-17 Thread Al Viro
On Sun, Jan 17, 2021 at 03:58:23PM -0600, Steve French wrote: > Jiapeng, > Aurelien is correct, you should respin this patch and correct for > where it breaks the sizeof calculation. For example your change: > > struct smb2_lock_rsp { > @@ -1434,7 +1434,7 @@ struct smb2_query_directory_req { >

Re: [PATCH] fs/cifs: Replace one-element array with flexible-array member.

2021-01-17 Thread Steve French
Jiapeng, Aurelien is correct, you should respin this patch and correct for where it breaks the sizeof calculation. For example your change: struct smb2_lock_rsp { @@ -1434,7 +1434,7 @@ struct smb2_query_directory_req { __le16 FileNameOffset; __le16 FileNameLength; __le32 O

Re: [PATCH] fs/cifs: Replace one-element array with flexible-array member.

2021-01-14 Thread Aurélien Aptel
Hi Jiapeng, This will change the size returned by sizeof(). Have you checked that this doesn't introduce off-by-one errors in all the sizeof() usage? Cheers, -- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH, Max

[PATCH] fs/cifs: Replace one-element array with flexible-array member.

2021-01-14 Thread Jiapeng Zhong
Fix the following coccicheck warning: ./fs/cifs/smb2pdu.h:1711:8-16: WARNING use flexible-array member instead(https://www.kernel.org/doc/html/latest/ process/deprecated.html#zero-length-and-one-element-arrays) ./fs/cifs/smb2pdu.h:1509:8-14: WARNING use flexible-array member instead(https://www.k