android_kernel_motorola_sm6375/fs/cifs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dan Carpenter d140ccb140 cifs: fix a sign extension bug
[ Upstream commit e946d3c887a9dc33aa82a349c6284f4a084163f4 ]

The problem is the mismatched types between "ctx->total_len" which is
an unsigned int, "rc" which is an int, and "ctx->rc" which is a
ssize_t.  The code does:

	ctx->rc = (rc == 0) ? ctx->total_len : rc;

We want "ctx->rc" to store the negative "rc" error code.  But what
happens is that "rc" is type promoted to a high unsigned int and
'ctx->rc" will store the high positive value instead of a negative
value.

The fix is to change "rc" from an int to a ssize_t.

Fixes: c610c4b619 ("CIFS: Add asynchronous write support through kernel AIO")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-30 10:09:24 +02:00
..
asn1.c cifs: remove bogus debug code 2020-10-29 09:57:28 +01:00
cache.c
cifs_debug.c
cifs_debug.h
cifs_dfs_ref.c cifs: prevent NULL deref in cifs_compose_mount_options() 2021-07-25 14:35:13 +02:00
cifs_fs_sb.h
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h
cifs_unicode.c CIFS: Fix a potencially linear read overflow 2021-09-15 09:47:36 +02:00
cifs_unicode.h
cifs_uniupr.h
cifsacl.c cifs: fix a memleak with modefromsid 2020-12-02 08:49:45 +01:00
cifsacl.h
cifsencrypt.c
cifsfs.c cifs: return proper error code in statfs(2) 2021-03-17 17:03:34 +01:00
cifsfs.h
cifsglob.h cifs: fix missing spinlock around update to ses->status 2021-07-14 16:53:19 +02:00
cifspdu.h
cifsproto.h cifs: fix rename() by ensuring source handle opened with DELETE bit 2020-03-12 13:00:18 +01:00
cifsroot.c
cifssmb.c cifs: fix leaked reference on requeued write 2020-05-20 08:20:34 +02:00
connect.c cifs: fix incorrect check for null pointer in header_assemble 2021-09-30 10:09:21 +02:00
dfs_cache.c cifs: fix unitialized variable poential problem with network I/O cache lock patch 2020-02-24 08:36:58 +01:00
dfs_cache.h
dir.c cifs: report error instead of invalid when revalidating a dentry fails 2021-02-10 09:25:30 +01:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: fix a sign extension bug 2021-09-30 10:09:24 +02:00
fscache.c
fscache.h
inode.c cifs: handle -EINTR in cifs_setattr 2020-11-05 11:43:21 +01:00
ioctl.c
Kconfig
link.c
Makefile
misc.c CIFS: Properly process SMB3 lease breaks 2020-10-01 13:17:21 +02:00
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c
rfc1002pdu.h
sess.c cifs: fix wrong release in sess_alloc_buffer() failed path 2021-09-22 12:26:35 +02:00
smb1ops.c CIFS: Properly process SMB3 lease breaks 2020-10-01 13:17:21 +02:00
smb2file.c
smb2glob.h
smb2inode.c cifs: fix rename() by ensuring source handle opened with DELETE bit 2020-03-12 13:00:18 +01:00
smb2maperror.c
smb2misc.c cifs: Silently ignore unknown oplock break handle 2021-04-10 13:34:31 +02:00
smb2ops.c cifs: fix the out of range assignment to bit fields in parse_server_interfaces 2021-07-31 08:19:38 +02:00
smb2pdu.c SMB3: incorrect file id in requests compounded with open 2021-06-03 08:59:12 +02:00
smb2pdu.h smb3: Fix out-of-bounds bug in SMB2_negotiate() 2021-02-10 09:25:30 +01:00
smb2proto.h smb3: remove unused flag passed into close functions 2021-01-19 18:26:13 +01:00
smb2status.h
smb2transport.c
smbdirect.c
smbdirect.h
smbencrypt.c
smberr.h
smbfsctl.h
trace.c
trace.h
transport.c cifs: change noisy error message to FYI 2021-03-30 14:35:21 +02:00
winucase.c
xattr.c