diff mbox

lpfc: Resolve static check error in lpfc_nvmet.c

Message ID 20180310010606.19539-1-jsmart2021@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

James Smart March 10, 2018, 1:06 a.m. UTC
Commit 6e8e1c14c61e ("scsi: lpfc: Add WQ Full Logic for NVME Target")
fails the static checker. Driver is missing an unlock on an return
path.

Add the unlock.

Fixes: 6e8e1c14c61e ("scsi: lpfc: Add WQ Full Logic for NVME Target")
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_nvmet.c | 1 +
 1 file changed, 1 insertion(+)

Comments

James Bottomley March 10, 2018, 1:23 a.m. UTC | #1
Really, the commit message has to be descriptive.  This makes me think
this is about some annoying policy of making everything static rather
than a critical bug.

What's wrong with

lpfc: add missing unlock on defer WQFULL path

?  You can then expand on the static checker discovery in the main
message.

Since this looks to be a pretty common occurrence, perhaps this should
be folded with a rebase?

James
James Smart March 10, 2018, 6:37 p.m. UTC | #2
On 3/9/2018 5:23 PM, James Bottomley wrote:
> Really, the commit message has to be descriptive.  This makes me think
> this is about some annoying policy of making everything static rather
> than a critical bug.
> 
> What's wrong with
> 
> lpfc: add missing unlock on defer WQFULL path
> 
> ?  You can then expand on the static checker discovery in the main
> message.
> 
> Since this looks to be a pretty common occurrence, perhaps this should
> be folded with a rebase?
> 
> James
> 

yeah - the title was pretty poor. Too long of a day on a friday. 
reposted a v2.

-- james
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index 66218afa1453..07f89524c320 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -1047,6 +1047,7 @@  lpfc_nvmet_xmt_fcp_abort(struct nvmet_fc_target_port *tgtport,
 		lpfc_nvmet_unsol_fcp_issue_abort(phba, ctxp, ctxp->sid,
 						 ctxp->oxid);
 		wq = phba->sli4_hba.nvme_wq[ctxp->wqeq->hba_wqidx];
+		spin_unlock_irqrestore(&ctxp->ctxlock, flags);
 		lpfc_nvmet_wqfull_flush(phba, wq, ctxp);
 		return;
 	}