Skip to content

Commit 4811e30

Browse files
Ronnie SahlbergSteve French
Ronnie Sahlberg
authored and
Steve French
committed
cifs: a smb2_validate_and_copy_iov failure does not mean the handle is invalid.
It only means that we do not have a valid cached value for the file_all_info structure. CC: Stable <[email protected]> Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent ca567eb commit 4811e30

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

fs/cifs/smb2ops.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -733,14 +733,12 @@ int open_shroot(unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid *pfid)
733733
qi_rsp = (struct smb2_query_info_rsp *)rsp_iov[1].iov_base;
734734
if (le32_to_cpu(qi_rsp->OutputBufferLength) < sizeof(struct smb2_file_all_info))
735735
goto oshr_exit;
736-
rc = smb2_validate_and_copy_iov(
736+
if (!smb2_validate_and_copy_iov(
737737
le16_to_cpu(qi_rsp->OutputBufferOffset),
738738
sizeof(struct smb2_file_all_info),
739739
&rsp_iov[1], sizeof(struct smb2_file_all_info),
740-
(char *)&tcon->crfid.file_all_info);
741-
if (rc)
742-
goto oshr_exit;
743-
tcon->crfid.file_all_info_is_valid = 1;
740+
(char *)&tcon->crfid.file_all_info))
741+
tcon->crfid.file_all_info_is_valid = 1;
744742

745743
oshr_exit:
746744
mutex_unlock(&tcon->crfid.fid_mutex);

0 commit comments

Comments
 (0)