Skip to content

Commit

Permalink
cifs: fix uninitialised var in smb2_compound_op()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paulo Alcantara authored and Steve French committed Oct 13, 2022
1 parent 76894f3 commit 69ccafd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/cifs/smb2inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 69ccafd

Please sign in to comment.