From: Paulo Alcantara Date: Tue, 4 Oct 2022 18:10:09 +0000 (-0300) Subject: cifs: fix uninitialised var in smb2_compound_op() X-Git-Tag: v6.6.17~6339^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69ccafdd35cdffd72504bfed58dcaee5e73a88a7;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French --- diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c index adf71b3..a6640e6 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)