diff options
author | Volker Lendecke <vl@samba.org> | 2023-01-11 12:37:58 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-02-20 11:48:48 -0600 |
commit | d447e794a37288ec7a080aa1b044a8d9deebbab7 (patch) | |
tree | 08316485e0c69dd09cc4d709f1dd2ae2ff9dca04 /fs/cifs | |
parent | 3891f6c7655a39065e44980f51ba46bb32be3133 (diff) |
cifs: Fix uninitialized memory read in smb3_qfs_tcon()
oparms was not fully initialized
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/smb2ops.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 157a19f371d6..f22d36019ff4 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -729,12 +729,13 @@ smb3_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid fid; struct cached_fid *cfid = NULL; - oparms.tcon = tcon; - oparms.desired_access = FILE_READ_ATTRIBUTES; - oparms.disposition = FILE_OPEN; - oparms.create_options = cifs_create_options(cifs_sb, 0); - oparms.fid = &fid; - oparms.reconnect = false; + oparms = (struct cifs_open_parms) { + .tcon = tcon, + .desired_access = FILE_READ_ATTRIBUTES, + .disposition = FILE_OPEN, + .create_options = cifs_create_options(cifs_sb, 0), + .fid = &fid, + }; rc = open_cached_dir(xid, tcon, "", cifs_sb, false, &cfid); if (rc == 0) |