]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commit91a52b617cdb8bf6d298892101c061d438b84a19
tree4fed6bb37cacb133fe24c1109ae12e8622885e1f
parent324e1c402069e8d277d2a2b18ce40bde1265b96a
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