提交 aa01d012 编写于 作者: S Steve French 提交者: Zheng Zengkai

smb3: rc uninitialized in one fallocate path

stable inclusion
from stable-5.10.58
commit c8b7cfa674ee18dcef601427c07aad987e4195a3
bugzilla: 176984 https://gitee.com/openeuler/kernel/issues/I4E2P4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c8b7cfa674ee18dcef601427c07aad987e4195a3

--------------------------------

[ Upstream commit 5ad4df56 ]

Clang detected a problem with rc possibly being unitialized
(when length is zero) in a recently added fallocate code path.
Reported-by: Nkernel test robot <lkp@intel.com>
Reviewed-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: NSteve French <stfrench@microsoft.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 7206d2d5
...@@ -3466,7 +3466,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid, ...@@ -3466,7 +3466,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid,
char *buf) char *buf)
{ {
struct cifs_io_parms io_parms = {0}; struct cifs_io_parms io_parms = {0};
int rc, nbytes; int nbytes;
int rc = 0;
struct kvec iov[2]; struct kvec iov[2];
io_parms.netfid = cfile->fid.netfid; io_parms.netfid = cfile->fid.netfid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册