linux/fs/cifs
Gustavo A. R. Silva bf1028a41e cifs: misc: Use array_size() in if-statement controlling expression
Use array_size() instead of the open-coded version in the controlling
expression of the if statement.

Also, while there, use the preferred form for passing a size of a struct.
The alternative form where struct name is spelled out hurts readability
and introduces an opportunity for a bug when the pointer variable type is
changed but the corresponding sizeof that is passed as argument is not.

This issue was found with the help of Coccinelle and, audited and fixed
manually.

Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2020-06-23 19:06:27 -05:00
..
asn1.c
cache.c smb3: extend fscache mount volume coherency check 2020-06-06 11:16:25 -05:00
cifs_debug.c cifs: Add get_security_type_str function to return sec type. 2020-06-08 23:57:21 -05:00
cifs_debug.h
cifs_dfs_ref.c
cifs_fs_sb.h
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c cifs: fix chown and chgrp when idsfromsid mount option enabled 2020-06-12 13:21:32 -05:00
cifsacl.h smb3: allow uid and gid owners to be set on create with idsfromsid mount option 2020-06-12 13:21:15 -05:00
cifsencrypt.c
cifsfs.c smb3: fix typo in mount options displayed in /proc/mounts 2020-06-10 12:05:15 -05:00
cifsfs.h cifs: update internal module version number 2020-06-04 13:50:55 -05:00
cifsglob.h cifs: Add get_security_type_str function to return sec type. 2020-06-08 23:57:21 -05:00
cifspdu.h
cifsproto.h smb3: allow uid and gid owners to be set on create with idsfromsid mount option 2020-06-12 13:21:15 -05:00
cifsroot.c
cifssmb.c
connect.c 22 changesets, 2 for stable. Includes big performance improvement for large i/o when using multichannel, also includes DFS fixes 2020-06-05 16:40:53 -07:00
dfs_cache.c
dfs_cache.h
dir.c smb311: add support for using info level for posix extensions query 2020-06-12 08:54:12 -05:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: Fix double add page to memcg when cifs_readpages 2020-06-23 12:04:52 -05:00
fscache.c smb3: extend fscache mount volume coherency check 2020-06-06 11:16:25 -05:00
fscache.h smb3: extend fscache mount volume coherency check 2020-06-06 11:16:25 -05:00
inode.c cifs: update ctime and mtime during truncate 2020-06-23 19:06:27 -05:00
ioctl.c
Kconfig
link.c smb311: add support for using info level for posix extensions query 2020-06-12 08:54:12 -05:00
Makefile
misc.c cifs: misc: Use array_size() in if-statement controlling expression 2020-06-23 19:06:27 -05:00
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c
rfc1002pdu.h
sess.c cifs: multichannel: try to rebind when reconnecting a channel 2020-06-04 13:50:55 -05:00
smb1ops.c
smb2file.c
smb2glob.h SMB311: Add support for query info using posix extensions (level 100) 2020-06-12 06:20:38 -05:00
smb2inode.c smb311: Add tracepoints for new compound posix query info 2020-06-12 08:55:18 -05:00
smb2maperror.c
smb2misc.c
smb2ops.c cifs/smb3: Fix data inconsistent when punch hole 2020-06-23 19:06:27 -05:00
smb2pdu.c smb3: Add debug message for new file creation with idsfromsid mount option 2020-06-12 16:31:06 -05:00
smb2pdu.h SMB311: Add support for query info using posix extensions (level 100) 2020-06-12 06:20:38 -05:00
smb2proto.h smb311: Add support for SMB311 query info (non-compounded) 2020-06-12 06:21:06 -05:00
smb2status.h
smb2transport.c
smbdirect.c
smbdirect.h
smbencrypt.c
smberr.h
smbfsctl.h
trace.c
trace.h smb311: Add tracepoints for new compound posix query info 2020-06-12 08:55:18 -05:00
transport.c 22 changesets, 2 for stable. Includes big performance improvement for large i/o when using multichannel, also includes DFS fixes 2020-06-05 16:40:53 -07:00
winucase.c
xattr.c