Skip to content

Commit

Permalink
cifs: add check for returning value of SMB2_set_info_init
Browse files Browse the repository at this point in the history
[ Upstream commit a51e5d293dd1c2e7bf6f7be788466cd9b5d280fb ]

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]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Anastasia Belova authored and gregkh committed Nov 25, 2022
1 parent 293c0d7 commit 04e9e5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/cifs/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,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]);

Expand Down

0 comments on commit 04e9e5e

Please sign in to comment.