[bug report] scsi: lpfc: NVME Target: Receive buffer updates

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

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux