Re: [bug report] cifs: create SMB2_open_init()/SMB2_open_free() helpers.

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

 



Yepp you are right.
I will update this. Thanks!

----- Original Message -----
From: "Dan Carpenter" <dan.carpenter@xxxxxxxxxx>
To: lsahlber@xxxxxxxxxx
Cc: linux-cifs@xxxxxxxxxxxxxxx
Sent: Monday, 6 August, 2018 6:54:47 PM
Subject: [bug report] cifs: create SMB2_open_init()/SMB2_open_free() helpers.

Hello Ronnie Sahlberg,

The patch 408565988cde: "cifs: create
SMB2_open_init()/SMB2_open_free() helpers." from Aug 1, 2018, leads
to the following static checker warning:

	fs/cifs/smb2pdu.c:2070 SMB2_open_init()
	error: uninitialized symbol 'req'.

fs/cifs/smb2pdu.c
  2064          unsigned int total_len;
  2065          struct kvec *iov = rqst->rq_iov;
  2066          __le16 *copy_path;
  2067          int rc;
  2068  
  2069          rc = smb2_plain_req_init(SMB2_CREATE, tcon, (void **) &req, &total_len);
  2070          iov[0].iov_base = (char *)req;
                                          ^^^
We haven't checked for failure until later.

  2071          /* -1 since last byte is buf[0] which is sent below (path) */
  2072          iov[0].iov_len = total_len - 1;
  2073  
  2074          if (rc)
                    ^^
Here.

  2075                  return rc;
  2076  

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux