Skip to content

Commit a51e5d2

Browse files
Anastasia BelovaSteve French
authored andcommitted
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: 0967e54 ("cifs: use a compound for setting an xattr") Signed-off-by: Anastasia Belova <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 92bbd67 commit a51e5d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/cifs/smb2ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
11161116
COMPOUND_FID, current->tgid,
11171117
FILE_FULL_EA_INFORMATION,
11181118
SMB2_O_INFO_FILE, 0, data, size);
1119+
if (rc)
1120+
goto sea_exit;
11191121
smb2_set_next_command(tcon, &rqst[1]);
11201122
smb2_set_related(&rqst[1]);
11211123

0 commit comments

Comments
 (0)