Commit a51e5d29 authored by Anastasia Belova's avatar Anastasia Belova Committed by Steve French

cifs: add check for returning value of SMB2_set_info_init

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: default avatarAnastasia Belova <abelova@astralinux.ru>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 92bbd67a
...@@ -1116,6 +1116,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -1116,6 +1116,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
COMPOUND_FID, current->tgid, COMPOUND_FID, current->tgid,
FILE_FULL_EA_INFORMATION, FILE_FULL_EA_INFORMATION,
SMB2_O_INFO_FILE, 0, data, size); SMB2_O_INFO_FILE, 0, data, size);
if (rc)
goto sea_exit;
smb2_set_next_command(tcon, &rqst[1]); smb2_set_next_command(tcon, &rqst[1]);
smb2_set_related(&rqst[1]); smb2_set_related(&rqst[1]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment