Re: lpfc: Modularize and cleanup FDMI code in driver

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

 



>>>>> "Dan" == Dan Carpenter <dan.carpenter@xxxxxxxxxx> writes:

Dick,

Please look into this...

---8<---

The patch 4258e98ee386: "lpfc: Modularize and cleanup FDMI code in
driver" from Dec 16, 2015, leads to the following static checker
warning:

	drivers/scsi/lpfc/lpfc_ct.c:2547 lpfc_fdmi_cmd()
	error: __memcpy() '&rh->rpl.pe' too small (4 vs 8)

drivers/scsi/lpfc/lpfc_ct.c
  2534          /* Next fill in the specific FDMI cmd information */
  2535          switch (cmdcode) {
  2536          case SLI_MGMT_RHAT:
  2537          case SLI_MGMT_RHBA:
  2538                  rh = (struct lpfc_fdmi_reg_hba *)&CtReq->un.PortID;
  2539                  /* HBA Identifier */
  2540                  memcpy(&rh->hi.PortName, &phba->pport->fc_sparam.portName,
  2541                         sizeof(struct lpfc_name));
  2542  
  2543                  if (cmdcode == SLI_MGMT_RHBA) {
  2544                          /* Registered Port List */
  2545                          /* One entry (port) per adapter */
  2546                          rh->rpl.EntryCnt = cpu_to_be32(1);
  2547                          memcpy(&rh->rpl.pe, &phba->pport->fc_sparam.portName,
                                       ^^^^^^^^^^^
.pe is a u32.

  2548                                 sizeof(struct lpfc_name));
                                       ^^^^^^^^^^^^^^^^^^^^^^^^
lpfc_name is an 8 byte union.

  2549  

regards,
dan carpenter

---8<---

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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