Skip to content

Commit 0a40f93

Browse files
committed
smb3 client: warn when parse contexts returns error on compounded operation
JIRA: https://issues.redhat.com/browse/RHEL-96872 commit d90b023 Author: Steve French <[email protected]> Date: Sun May 4 18:26:45 2025 -0500 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) <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Paulo Alcantara <[email protected]>
1 parent c5169a3 commit 0a40f93

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)