projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2a26a3
)
smb3: rc uninitialized in one fallocate path
author
Steve French
<stfrench@microsoft.com>
Mon, 26 Jul 2021 21:22:55 +0000
(16:22 -0500)
committer
Steve French
<stfrench@microsoft.com>
Tue, 27 Jul 2021 03:35:46 +0000
(22:35 -0500)
Clang detected a problem with rc possibly being unitialized
(when length is zero) in a recently added fallocate code path.
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c
patch
|
blob
|
history
diff --git
a/fs/cifs/smb2ops.c
b/fs/cifs/smb2ops.c
index 23d6f4d716498f5c0c95974650893154984cb569..2dfd0d8297eb36c616bad312c99948ef1249da6d 100644
(file)
--- a/
fs/cifs/smb2ops.c
+++ b/
fs/cifs/smb2ops.c
@@
-3617,7
+3617,8
@@
static int smb3_simple_fallocate_write_range(unsigned int xid,
char *buf)
{
struct cifs_io_parms io_parms = {0};
- int rc, nbytes;
+ int nbytes;
+ int rc = 0;
struct kvec iov[2];
io_parms.netfid = cfile->fid.netfid;