linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: smfrench@gmail.com
Subject: [PATCH 1/4] [SMB3] Fix warning on uninitialized buftype
Date: Fri, 27 Mar 2015 00:27:59 -0500	[thread overview]
Message-ID: <1427434082-4299-2-git-send-email-smfrench@gmail.com> (raw)
In-Reply-To: <1427434082-4299-1-git-send-email-smfrench@gmail.com>

Pointed out by coverity analyzer.  resp_buftype is
not initialized in one path which can rarely log
a spurious warning (buf is null so there will
not be a problem with freeing data, but if buf_type
were randomly set to wrong value could log a warning)

Reported by Coverity (CID 1269144)

Signed-off-by: Steve French <smfrench@gmail.com>
---
 fs/cifs/smb2pdu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 3417340..1b906de 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -2114,7 +2114,7 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
 	struct kvec iov[2];
 	int rc = 0;
 	int len;
-	int resp_buftype;
+	int resp_buftype = CIFS_NO_BUFFER;
 	unsigned char *bufptr;
 	struct TCP_Server_Info *server;
 	struct cifs_ses *ses = tcon->ses;
-- 
1.9.1


  reply	other threads:[~2015-03-27  5:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27  5:27 [PATCH 0/4] Fix various coverity warnings in fs/cifs Steve French
2015-03-27  5:27 ` Steve French [this message]
2015-03-28 14:19   ` [PATCH 1/4] [SMB3] Fix warning on uninitialized buftype Shirish Pargaonkar
2015-03-30  9:36   ` Sachin Prabhu
2015-04-01  0:35   ` Jeff Layton
2015-03-27  5:28 ` [PATCH 2/4] [CIFS] Don't ignore errors on encrypting password in SMBTcon Steve French
2015-03-28 14:26   ` Shirish Pargaonkar
2015-03-30  9:44   ` Sachin Prabhu
2015-04-01  0:37   ` Jeff Layton
2015-03-27  5:28 ` [PATCH 3/4] [SMB3] Fix dereference before null check warning Steve French
2015-03-28 14:27   ` Shirish Pargaonkar
2015-03-30  9:50   ` Sachin Prabhu
2015-04-01  0:46   ` Jeff Layton
2015-04-01  5:00     ` Steve French
2015-04-01 11:07       ` Jeff Layton
2015-03-27  5:28 ` [PATCH 4/4] [SMB3] Fix coverity warning Steve French
2015-03-28 15:05   ` Shirish Pargaonkar
2015-03-30  9:51   ` Sachin Prabhu
2015-04-01  0:38   ` Jeff Layton

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=1427434082-4299-2-git-send-email-smfrench@gmail.com \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).