OSDN Git Service

scsi: lpfc: Fix premature re-enabling of interrupts in lpfc_sli_host_down
authorJames Smart <jsmart2021@gmail.com>
Sun, 22 Sep 2019 03:58:48 +0000 (20:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Oct 2019 02:07:08 +0000 (22:07 -0400)
Use of spin_lock_irq may re-enable interrupts prematurely.

Convert to spin_lock. Note: code is under the phba->hba_lock which has been
locked with irqsave.

Link: https://lore.kernel.org/r/20190922035906.10977-3-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_sli.c

index a0c6945..3b3ae21 100644 (file)
@@ -10678,14 +10678,14 @@ lpfc_sli_host_down(struct lpfc_vport *vport)
                                set_bit(LPFC_DATA_READY, &phba->data_flags);
                        }
                        prev_pring_flag = pring->flag;
-                       spin_lock_irq(&pring->ring_lock);
+                       spin_lock(&pring->ring_lock);
                        list_for_each_entry_safe(iocb, next_iocb,
                                                 &pring->txq, list) {
                                if (iocb->vport != vport)
                                        continue;
                                list_move_tail(&iocb->list, &completions);
                        }
-                       spin_unlock_irq(&pring->ring_lock);
+                       spin_unlock(&pring->ring_lock);
                        list_for_each_entry_safe(iocb, next_iocb,
                                                 &pring->txcmplq, list) {
                                if (iocb->vport != vport)