[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210803114408.2252713-8-sashal@kernel.org>
Date: Tue, 3 Aug 2021 07:44:07 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Steve French <stfrench@...rosoft.com>,
kernel test robot <lkp@...el.com>,
Paulo Alcantara <pc@....nz>, Sasha Levin <sashal@...nel.org>,
linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
clang-built-linux@...glegroups.com
Subject: [PATCH AUTOSEL 5.10 8/9] smb3: rc uninitialized in one fallocate path
From: Steve French <stfrench@...rosoft.com>
[ Upstream commit 5ad4df56cd2158965f73416d41fce37906724822 ]
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@...el.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@....nz>
Signed-off-by: Steve French <stfrench@...rosoft.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
fs/cifs/smb2ops.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 81e087723777..fdb1d660bd13 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -3466,7 +3466,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;
--
2.30.2
Powered by blists - more mailing lists