提交 39975a81 编写于 作者: A Anastasia Belova 提交者: sanglipeng

cifs: add check for returning value of SMB2_close_init

stable inclusion
from stable-v5.10.156
commit 3aeb13bc3db2400285eef9002af6e45f93f84d6a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MCG1

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

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

[ Upstream commit d520de6c ]

If the returning value of SMB2_close_init is an error-value,
exit the function.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 352d96f3 ("cifs: multichannel: move channel selection above transport layer")
Signed-off-by: NAnastasia Belova <abelova@astralinux.ru>
Signed-off-by: NSteve French <stfrench@microsoft.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 e536145a
......@@ -1266,6 +1266,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
rqst[2].rq_nvec = 1;
rc = SMB2_close_init(tcon, server,
&rqst[2], COMPOUND_FID, COMPOUND_FID, false);
if (rc)
goto sea_exit;
smb2_set_related(&rqst[2]);
rc = compound_send_recv(xid, ses, server,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册