[bug report] scsi: lpfc: Add WQ Full Logic for NVME Target

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

 



Hello James Smart,

The patch 6e8e1c14c61e: "scsi: lpfc: Add WQ Full Logic for NVME
Target" from Jan 30, 2018, leads to the following static checker
warning:

	drivers/scsi/lpfc/lpfc_nvmet.c:921 lpfc_nvmet_xmt_fcp_abort()
	warn: inconsistent returns 'ctxp->ctxlock'.

drivers/scsi/lpfc/lpfc_nvmet.c
   889          atomic_inc(&lpfc_nvmep->xmt_fcp_abort);
   890  
   891          spin_lock_irqsave(&ctxp->ctxlock, flags);
   892          ctxp->state = LPFC_NVMET_STE_ABORT;
   893  
   894          /* Since iaab/iaar are NOT set, we need to check
   895           * if the firmware is in process of aborting IO
   896           */
   897          if (ctxp->flag & LPFC_NVMET_XBUSY) {
   898                  spin_unlock_irqrestore(&ctxp->ctxlock, flags);
   899                  return;
   900          }
   901          ctxp->flag |= LPFC_NVMET_ABORT_OP;
   902  
   903          if (ctxp->flag & LPFC_NVMET_DEFER_WQFULL) {
   904                  lpfc_nvmet_unsol_fcp_issue_abort(phba, ctxp, ctxp->sid,
   905                                                   ctxp->oxid);
   906                  wq = phba->sli4_hba.nvme_wq[ctxp->wqeq->hba_wqidx];
   907                  lpfc_nvmet_wqfull_flush(phba, wq, ctxp);
   908                  return;
                        ^^^^^^^
Missing unlock before this return.

   909          }
   910  
   911          /* An state of LPFC_NVMET_STE_RCV means we have just received
   912           * the NVME command and have not started processing it.
   913           * (by issuing any IO WQEs on this exchange yet)
   914           */
   915          if (ctxp->state == LPFC_NVMET_STE_RCV)
   916                  lpfc_nvmet_unsol_fcp_issue_abort(phba, ctxp, ctxp->sid,
   917                                                   ctxp->oxid);
   918          else
   919                  lpfc_nvmet_sol_fcp_issue_abort(phba, ctxp, ctxp->sid,
   920                                                 ctxp->oxid);
   921          spin_unlock_irqrestore(&ctxp->ctxlock, flags);
   922  }


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