scsi: lpfc: Fix deadlock due to nested hbalock call
authorJames Smart <jsmart2021@gmail.com>
Tue, 12 Mar 2019 23:30:12 +0000 (16:30 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Mar 2019 16:57:02 +0000 (12:57 -0400)
commit731eedcb317a5a4b5776d3c78ffe5e79c596fa16
tree449a2b9414aea3df77bdc868b948d3be82ee57cb
parent22b738ac3309c8712ac6aa8095e27bbc4067e4b3
scsi: lpfc: Fix deadlock due to nested hbalock call

If an adapter fails, causing a board reset, the board reset routine
lpfc_hba_down_s4() takes the hbalock out then calls
lpfc_nvmet_ctxbuf_post() who then tries to take out the same lock.  As the
context lists are now protected under the buf_list_locks, there is no need
for the hbalock to be held by the board reset routine.

Fix by no longer taking the hbalock in the board reset routine.

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_init.c