public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] scsi: lpfc: NVME Target: Receive buffer updates
@ 2017-02-27 16:44 Dan Carpenter
  2017-03-04 17:45 ` James Smart
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-02-27 16:44 UTC (permalink / raw)
  To: jsmart2021; +Cc: linux-scsi

Hello James Smart,

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

The patch 2d7dbc4c2775: "scsi: lpfc: NVME Target: Receive buffer 
updates" from Feb 12, 2017, leads to the following Smatch complaint:

drivers/scsi/lpfc/lpfc_sli.c:15194 lpfc_mrq_create()
	 warn: variable dereferenced before check 'hrq' (see line 15188)

drivers/scsi/lpfc/lpfc_sli.c
 15181          cnt = 0;
 15182  
 15183          for (idx = 0; idx < numrq; idx++) {
 15184                  hrq = hrqp[idx];
 15185                  drq = drqp[idx];
 15186                  cq  = cqp[idx];
 15187	
 15188			if (hrq->entry_count != drq->entry_count) {
                            ^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^^^^^
Dereferences.

 15189				status = -EINVAL;
 15190				goto out;
 15191			}
 15192	
 15193			/* sanity check on queue memory */
 15194			if (!hrq || !drq || !cq) {
                             ^^^^^^^^^^^
Too late.

 15195				status = -ENODEV;
 15196				goto out;

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] scsi: lpfc: NVME Target: Receive buffer updates
  2017-02-27 16:44 [bug report] scsi: lpfc: NVME Target: Receive buffer updates Dan Carpenter
@ 2017-03-04 17:45 ` James Smart
  0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2017-03-04 17:45 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-scsi



On 2/27/2017 8:44 AM, Dan Carpenter wrote:
> Hello James Smart,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 2d7dbc4c2775: "scsi: lpfc: NVME Target: Receive buffer
> updates" from Feb 12, 2017, leads to the following Smatch complaint:
>
>

Thanks.  Issues were addressed by patch from Colin King, and pushed in 
the lpfc patch set just posted.
see http://marc.info/?l=linux-scsi&m=148864866515100&w=2

-- james

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-04 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 16:44 [bug report] scsi: lpfc: NVME Target: Receive buffer updates Dan Carpenter
2017-03-04 17:45 ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox