[bug report] cifs: add new debugging macro cifs_server_dbg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux