提交 08985079 编写于 作者: A Anastasia Belova 提交者: openeuler-sync-bot

cifs: add check for returning value of SMB2_set_info_init

stable inclusion
from stable-v5.10.156
commit 5fc19c83132042b6c6a35cd66be4fdf61711760d
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=5fc19c83132042b6c6a35cd66be4fdf61711760d

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

[ Upstream commit a51e5d29 ]

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

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

Fixes: 0967e545 ("cifs: use a compound for setting an xattr")
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>
(cherry picked from commit 2549ce09)
上级 a0afcd19
无相关合并请求
......@@ -1256,6 +1256,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
COMPOUND_FID, current->tgid,
FILE_FULL_EA_INFORMATION,
SMB2_O_INFO_FILE, 0, data, size);
if (rc)
goto sea_exit;
smb2_set_next_command(tcon, &rqst[1]);
smb2_set_related(&rqst[1]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部