Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
* [bug report] cifs: add new debugging macro cifs_server_dbg
@ 2019-09-03  9:26 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-09-03  9:26 UTC (permalink / raw)
  To: lsahlber; +Cc: linux-cifs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03  9:26 [bug report] cifs: add new debugging macro cifs_server_dbg Dan Carpenter

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org linux-cifs@archiver.kernel.org
	public-inbox-index linux-cifs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox