]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cifs: fix uninitialised var in smb2_compound_op()
authorPaulo Alcantara <pc@cjr.nz>
Tue, 4 Oct 2022 18:10:09 +0000 (15:10 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:54 +0000 (13:26 +0100)
commit 69ccafdd35cdffd72504bfed58dcaee5e73a88a7 upstream.

Fix uninitialised variable @idata when calling smb2_compound_op() with
SMB2_OP_POSIX_QUERY_INFO.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Conor Dooley <conor@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2inode.c

index 7b14ece0d895e8e665a492a647cee7b93e4315b3..fc5776e7a7824b31290b16d4f09ca31ea5184394 100644 (file)
@@ -415,6 +415,7 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
                                                tcon->tid);
                break;
        case SMB2_OP_POSIX_QUERY_INFO:
+               idata = ptr;
                if (rc == 0 && cfile && cfile->symlink_target) {
                        idata->symlink_target = kstrdup(cfile->symlink_target, GFP_KERNEL);
                        if (!idata->symlink_target)