linux-stable/drivers/scsi/lpfc
James Smart 50e3f871fb scsi: lpfc: Resolve irq-unsafe lockdep heirarchy warning in lpfc_io_free
A patch in the 12.2.0.0 set caused a new lockdep warning:

  WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
  5.0.0-rc8-next-20190301-dbg+ #1 Not tainted

  Possible interrupt unsafe locking scenario:
       CPU0                    CPU1
       ----                    ----
  lock(&(&qp->io_buf_list_put_lock)->rlock);
                               local_irq_disable();
                               lock(&(&phba->hbalock)->rlock);
                               lock(&(&qp->io_buf_list_put_lock)->rlock);
  <Interrupt>
    lock(&(&phba->hbalock)->rlock);

see: https://www.spinics.net/lists/linux-scsi/msg128389.html

In summary, the new patch added taking the io_buf_list_put_lock while under
an irq-disabled hbalock. This created a lock heirarchy dependent upon irq
being disabled, and there are paths that take the io_buf_list_put_lock
without disabling irq.

Looking at the lpfc_io_free routine, which is where the new heirarchy was
introduced, there is no reason to be taking out the hbalock and raising
irq, as the functionality is replaced by the io_buf_list_xxx locks.

Resolve by removing the hbalock/irq calls in lpfc_io_free.

Fixes: 5e5b511d8b ("scsi: lpfc: Partition XRI buffer list across Hardware Queues")
Reported-by: Bart Van Assche <bvanassche@acm.org>
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>
2019-03-19 12:57:01 -04:00
..
lpfc.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_attr.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_attr.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_bsg.c SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_bsg.h scsi: lpfc: add Trunking support 2018-11-06 20:42:51 -05:00
lpfc_compat.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_crtn.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_ct.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_debugfs.c scsi: lpfc: fix a handful of indentation issues 2019-02-13 22:15:42 -05:00
lpfc_debugfs.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_disc.h scsi: lpfc: Fix discovery failures during port failovers with lots of vports 2018-12-07 22:35:32 -05:00
lpfc_els.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_hbadisc.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_hw.h Revert "scsi: lpfc: ls_rjt erroneus FLOGIs" 2018-12-12 20:26:56 -05:00
lpfc_hw4.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_ids.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_init.c scsi: lpfc: Resolve irq-unsafe lockdep heirarchy warning in lpfc_io_free 2019-03-19 12:57:01 -04:00
lpfc_logmsg.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_mbox.c SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_mem.c scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_nl.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_nportdisc.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_nvme.c SCSI misc on 20190315 2019-03-16 12:51:50 -07:00
lpfc_nvme.h SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_nvmet.c SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_nvmet.h SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
lpfc_scsi.c scsi: lpfc: Resolve inconsistent check of hdwq in lpfc_scsi_cmd_iocb_cmpl 2019-03-19 12:57:01 -04:00
lpfc_scsi.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_sli.c SCSI misc on 20190315 2019-03-16 12:51:50 -07:00
lpfc_sli.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_sli4.h scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_version.h scsi: lpfc: Update lpfc version to 12.2.0.0 2019-02-05 22:29:50 -05:00
lpfc_vport.c scsi: lpfc: Update 12.2.0.0 file copyrights to 2019 2019-02-05 22:29:50 -05:00
lpfc_vport.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
Makefile scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00