]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix hardlockup in lpfc_abort_handler
authorJames Smart <jsmart2021@gmail.com>
Fri, 18 Oct 2019 21:18:22 +0000 (14:18 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Oct 2019 01:02:04 +0000 (21:02 -0400)
commit301c34360161e52d365e5c1f48d6228dec6a405e
tree4fed6bb37cacb133fe24c1109ae12e8622885e1f
parentd8b5f5333a934de5b4b9b198431c42005bf5fd6b
scsi: lpfc: Fix hardlockup in lpfc_abort_handler

In lpfc_abort_handler, the lock acquire order is hbalock (irqsave),
buf_lock (irq) and ring_lock (irq).  The issue is that in two places the
locks are released out of order - the buf_lock and the hbalock - resulting
in the cpu preemption/lock flags getting restored out of order and
deadlocking the cpu.

Fix the unlock order by fully releasing the hbalocks as well.

CC: Zhangguanghui <zhang.guanghui@h3c.com>
Link: https://lore.kernel.org/r/20191018211832.7917-7-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_scsi.c