summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2022-10-04 20:10:09 +0200
committerSteve French <stfrench@microsoft.com>2022-10-13 16:36:38 +0200
commit69ccafdd35cdffd72504bfed58dcaee5e73a88a7 (patch)
tree33d242d96e5fc088999e90f203c10ac25059ae32 /fs
parentcifs: improve symlink handling for smb2+ (diff)
downloadlinux-69ccafdd35cdffd72504bfed58dcaee5e73a88a7.tar.xz
linux-69ccafdd35cdffd72504bfed58dcaee5e73a88a7.zip
cifs: fix uninitialised var in smb2_compound_op()
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/smb2inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
index adf71b328f32..a6640e6ea58b 100644
--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -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)