Skip to content

Commit d90b023

Browse files
author
Steve French
committed
smb3 client: warn when parse contexts returns error on compounded operation
Coverity noticed that the rc on smb2_parse_contexts() was not being checked in the case of compounded operations. Since we don't want to stop parsing the following compounded responses which are likely valid, we can't easily error out here, but at least print a warning message if server has a bug causing us to skip parsing the open response contexts. Addresses-Coverity: 1639191 Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 92a09c4 commit d90b023

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/smb/client/smb2inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
666666
/* smb2_parse_contexts() fills idata->fi.IndexNumber */
667667
rc = smb2_parse_contexts(server, &rsp_iov[0], &oparms->fid->epoch,
668668
oparms->fid->lease_key, &oplock, &idata->fi, NULL);
669+
if (rc)
670+
cifs_dbg(VFS, "rc: %d parsing context of compound op\n", rc);
669671
}
670672

671673
for (i = 0; i < num_cmds; i++) {

0 commit comments

Comments
 (0)