diff options
author | James Smart <james.smart@emulex.com> | 2013-03-01 21:36:54 (GMT) |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-04-09 22:20:27 (GMT) |
commit | 2562669cf681f155be0746f7965bbcb6753bdb64 (patch) | |
tree | d8cc910ac0839a2dc655f1b8ea32d05130ed2915 /drivers/scsi/lpfc/lpfc_sli.c | |
parent | a33c4f7bff84c3546b1a4c647462009fa601a160 (diff) | |
download | linux-2562669cf681f155be0746f7965bbcb6753bdb64.tar.xz |
[SCSI] lpfc 8.3.38: Fixed deadlock condition in FCF round robin handling
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index a0ef439..57cb974 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -15507,11 +15507,18 @@ lpfc_check_next_fcf_pri_level(struct lpfc_hba *phba) LPFC_SLI4_FCF_TBL_INDX_MAX); lpfc_printf_log(phba, KERN_INFO, LOG_FIP, "3060 Last IDX %d\n", last_index); - if (list_empty(&phba->fcf.fcf_pri_list)) { + + /* Verify the priority list has 2 or more entries */ + spin_lock_irq(&phba->hbalock); + if (list_empty(&phba->fcf.fcf_pri_list) || + list_is_singular(&phba->fcf.fcf_pri_list)) { + spin_unlock_irq(&phba->hbalock); lpfc_printf_log(phba, KERN_ERR, LOG_FIP, "3061 Last IDX %d\n", last_index); return 0; /* Empty rr list */ } + spin_unlock_irq(&phba->hbalock); + next_fcf_pri = 0; /* * Clear the rr_bmask and set all of the bits that are at this |