Skip to content

Commit

Permalink
[SCSI] lpfc: fix lock imbalances
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and James Bottomley committed Apr 8, 2010
1 parent 4ec3fdb commit 67221a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/lpfc/lpfc_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 67221a4

Please sign in to comment.