diff options
author | Andi Shyti <andi@etezian.org> | 2013-07-29 20:04:35 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-07-30 23:54:49 -0500 |
commit | fe090e4e44bac1d7d8c0ebd1dfa4e6007e1b2762 (patch) | |
tree | 63c1464c9b8e598ebacfeedf98600876be0dee8b /fs/cifs/file.c | |
parent | 1b244081af462c223cfa6a1ae881a902af64c306 (diff) | |
download | op-kernel-dev-fe090e4e44bac1d7d8c0ebd1dfa4e6007e1b2762.zip op-kernel-dev-fe090e4e44bac1d7d8c0ebd1dfa4e6007e1b2762.tar.gz |
cifs: file: initialize oparms.reconnect before using it
In the cifs_reopen_file function, if the following statement is
asserted:
(tcon->unix_ext && cap_unix(tcon->ses) &&
(CIFS_UNIX_POSIX_PATH_OPS_CAP &
(tcon->fsUnixInfo.Capability)))
and we succeed to open with cifs_posix_open, the function jumps
to the label reopen_success and checks for oparms.reconnect
which is not initialized.
This issue has been reported by scan.coverity.com
Signed-off-by: Andi Shyti <andi@etezian.org>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 1e57f36..7e36ae3 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -647,6 +647,7 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush) oflags, &oplock, &cfile->fid.netfid, xid); if (rc == 0) { cifs_dbg(FYI, "posix reopen succeeded\n"); + oparms.reconnect = true; goto reopen_success; } /* |