[SCSI] lpfc: fix lock imbalances

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, April 22, 2010 - 9:59 am

Gitweb:     http://git.kernel.org/linus/67221a4226a5fc48e413e2050db266bb171753c4
Commit:     67221a4226a5fc48e413e2050db266bb171753c4
Parent:     4ec3fdbef17d0266826b56b33735dc9dada58c27
Author:     Jiri Slaby <jslaby@suse.cz>
AuthorDate: Tue Mar 16 16:23:58 2010 +0100
Committer:  James Bottomley <James.Bottomley@suse.de>
CommitDate: Thu Apr 8 18:42:10 2010 -0400

    [SCSI] lpfc: fix lock imbalances
    
    Stanse found that two error paths in lpfc_bsg_rport_els_cmp and
    lpfc_issue_ct_rsp_cmp omits to unlock phba->ct_ev_lock. It is
    because they wrongly unlock phba->hbalock instead. Fix that.
    
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Acked-by: James Smart <james.smart@emulex.com>
    Signed-off-by: James Bottomley <James.Bottomley@suse.de>
---
 drivers/scsi/lpfc/lpfc_bsg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index ec37238..d62b3e4 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -433,7 +433,7 @@ lpfc_bsg_rport_els_cmp(struct lpfc_hba *phba,
 	dd_data = cmdiocbq->context1;
 	/* normal completion and timeout crossed paths, already done */
 	if (!dd_data) {
-		spin_unlock_irqrestore(&phba->hbalock, flags);
+		spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
 		return;
 	}
 
@@ -1196,7 +1196,7 @@ lpfc_issue_ct_rsp_cmp(struct lpfc_hba *phba,
 	dd_data = cmdiocbq->context1;
 	/* normal completion and timeout crossed paths, already done */
 	if (!dd_data) {
-		spin_unlock_irqrestore(&phba->hbalock, flags);
+		spin_unlock_irqrestore(&phba->ct_ev_lock, flags);
 		return;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[SCSI] lpfc: fix lock imbalances, Linux Kernel Mailing ..., (Thu Apr 22, 9:59 am)