All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: lsahlber@redhat.com
Cc: linux-cifs@vger.kernel.org
Subject: [bug report] cifs: add new debugging macro cifs_server_dbg
Date: Tue, 3 Sep 2019 12:26:04 +0300	[thread overview]
Message-ID: <20190903092604.GA26395@mwanda> (raw)

Hello Ronnie Sahlberg,

This is a semi-automatic email about new static checker warnings.

The patch 2808c6639104: "cifs: add new debugging macro 
cifs_server_dbg" from Aug 28, 2019, leads to the following Smatch 
complaint:

    fs/cifs/smb2pdu.c:3067 query_info()
    warn: variable dereferenced before check 'ses' (see line 3061)

fs/cifs/smb2pdu.c
  3060		struct cifs_ses *ses = tcon->ses;
  3061		struct TCP_Server_Info *server = ses->server;
                                                 ^^^^^^^^^^^
New dereference.

  3062		int flags = 0;
  3063		bool allocated = false;
  3064
  3065		cifs_dbg(FYI, "Query Info\n");
  3066
  3067		if (!ses || !(server))
                    ^^^^
The old code checked for NULL.

  3068			return -EIO;
  3069

regards,
dan carpenter

                 reply	other threads:[~2019-09-03  9:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190903092604.GA26395@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.