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 | de036dcaca65cf94bf7ff09c571c077f02bc92b4 (patch) | |
tree | cf0ccb33f88531be01aa185c8fb5246f41d8c1b0 /fs/cifs/cached_dir.c | |
parent | 5574920c7a6b0ce7f3d0888ccf1efb9b7870b928 (diff) |
cifs: Fix uninitialized memory reads for oparms.mode
Use a struct assignment with implicit member initialization
Signed-off-by: Volker Lendecke <vl@samba.org>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cached_dir.c')
-rw-r--r-- | fs/cifs/cached_dir.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/cifs/cached_dir.c b/fs/cifs/cached_dir.c index 60399081046a..b36ae64034a3 100644 --- a/fs/cifs/cached_dir.c +++ b/fs/cifs/cached_dir.c @@ -181,12 +181,13 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, rqst[0].rq_iov = open_iov; rqst[0].rq_nvec = SMB2_CREATE_IOV_SIZE; - oparms.tcon = tcon; - oparms.create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE); - oparms.desired_access = FILE_READ_ATTRIBUTES; - oparms.disposition = FILE_OPEN; - oparms.fid = pfid; - oparms.reconnect = false; + oparms = (struct cifs_open_parms) { + .tcon = tcon, + .create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE), + .desired_access = FILE_READ_ATTRIBUTES, + .disposition = FILE_OPEN, + .fid = pfid, + }; rc = SMB2_open_init(tcon, server, &rqst[0], &oplock, &oparms, utf16_path); |