From: Jeff Layton <jlayton@redhat.com>
To: Andi Shyti <andi@etezian.org>
Cc: smfrench@gmail.com, linux-cifs@vger.kernel.org,
linux-kernel@vger.kernel.org, mikko.rapeli@iki.fi,
pshilovsky@samba.org
Subject: Re: [PATCH v2] cifs: file: initialize oparms.reconnect before using it
Date: Mon, 29 Jul 2013 16:20:16 -0400 [thread overview]
Message-ID: <20130729162016.3299ead3@tlielax.poochiereds.net> (raw)
In-Reply-To: <1375121075-11239-1-git-send-email-andi@etezian.org>
On Mon, 29 Jul 2013 20:04:35 +0200
Andi Shyti <andi@etezian.org> wrote:
> 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>
> ---
> fs/cifs/file.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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;
> }
> /*
Still doesn't do much to improve this code, but that fix shouldn't
break anything.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
prev parent reply other threads:[~2013-07-29 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 8:58 [PATCH RESEND] cifs: file: initialize oparms.reconnect before using it Andi Shyti
2013-07-29 13:32 ` Jeff Layton
2013-07-29 16:35 ` Andi Shyti
2013-07-29 18:04 ` [PATCH v2] " Andi Shyti
2013-07-29 20:20 ` Jeff Layton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130729162016.3299ead3@tlielax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=andi@etezian.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikko.rapeli@iki.fi \
--cc=pshilovsky@samba.org \
--cc=smfrench@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox