]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb3 client: warn when parse contexts returns error on compounded operation
authorSteve French <stfrench@microsoft.com>
Sun, 4 May 2025 23:26:45 +0000 (18:26 -0500)
committerSteve French <stfrench@microsoft.com>
Tue, 6 May 2025 14:05:15 +0000 (09:05 -0500)
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>
fs/smb/client/smb2inode.c

index 57d9bfbadd97b2b38cbfc938dafe5e0ec080850e..2a3e46b8e15af6a67b3836440ba0d7823a0ba408 100644 (file)
@@ -666,6 +666,8 @@ finished:
                /* smb2_parse_contexts() fills idata->fi.IndexNumber */
                rc = smb2_parse_contexts(server, &rsp_iov[0], &oparms->fid->epoch,
                                         oparms->fid->lease_key, &oplock, &idata->fi, NULL);
+               if (rc)
+                       cifs_dbg(VFS, "rc: %d parsing context of compound op\n", rc);
        }
 
        for (i = 0; i < num_cmds; i++) {