summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2ops.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-07-05 13:47:34 +0100
committerSteve French <smfrench@gmail.com>2017-07-05 20:01:22 -0500
commit709340a00ad67aea081916582846248e3b18b463 (patch)
tree667e3af7b065e2dcc2b03683bd9e52d17184aa25 /fs/cifs/smb2ops.c
parent93d2cb6c82f4d50a1b35b9de379ebb1d022801ac (diff)
downloadlinux-709340a00ad67aea081916582846248e3b18b463.tar.bz2
cifs: set oparms.create_options rather than or'ing in CREATE_OPEN_BACKUP_INTENT
Currently oparms.create_options is uninitialized and the code is logically or'ing in CREATE_OPEN_BACKUP_INTENT onto a garbage value of oparms.create_options from the stack. Fix this by just setting the value rather than or'ing in the setting. Detected by CoverityScan, CID#1447220 ("Unitialized scale value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r--fs/cifs/smb2ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 323bafdd7909..ccbb397debbc 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1339,7 +1339,7 @@ get_smb2_acl_by_path(struct cifs_sb_info *cifs_sb,
xid = get_xid();
if (backup_cred(cifs_sb))
- oparms.create_options |= CREATE_OPEN_BACKUP_INTENT;
+ oparms.create_options = CREATE_OPEN_BACKUP_INTENT;
else
oparms.create_options = 0;