Commit e0fc5b11 authored by Steve French's avatar Steve French
Browse files

SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path

Ran into an intermittent crash in
due to oparms.cifs_sb not being initialized when called from:
Zero the whole oparms struct in the compounding path before setting up the
oparms so we don't risk any uninitialized fields.

Fixes: fdef665b

 ("smb3: fix mode passed in on create for modetosid mount option")
Signed-off-by: default avatarSteve French <>
Acked-by: default avatarRonnie Sahlberg <>
Reviewed-by: default avatarPavel Shilovsky <>
parent 28139389
......@@ -95,6 +95,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
goto finished;
memset(&oparms, 0, sizeof(struct cifs_open_parms));
oparms.tcon = tcon;
oparms.desired_access = desired_access;
oparms.disposition = create_disposition;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment