Skip to content

Commit d520de6

Browse files
Anastasia Belovasmfrench
authored andcommitted
cifs: add check for returning value of SMB2_close_init
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: 352d96f ("cifs: multichannel: move channel selection above transport layer") Signed-off-by: Anastasia Belova <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 1dcdf5f commit d520de6

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
@@ -1126,6 +1126,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
11261126
rqst[2].rq_nvec = 1;
11271127
rc = SMB2_close_init(tcon, server,
11281128
&rqst[2], COMPOUND_FID, COMPOUND_FID, false);
1129+
if (rc)
1130+
goto sea_exit;
11291131
smb2_set_related(&rqst[2]);
11301132

11311133
rc = compound_send_recv(xid, ses, server,

0 commit comments

Comments
 (0)