]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:05:10 +0000 (00:05 -0500)
commitd130208f6b7d47cd80d1ac370bb5a1acf82a1b35
tree70f9583366644295676cb9553f26ff82dbbcab93
parent82761ea5ac15c62433a57f7871b28a7911ab7d5e
scsi: lpfc: Fix hardlockup in lpfc_abort_handler

BugLink: https://bugs.launchpad.net/bugs/1860816
[ Upstream commit 91a52b617cdb8bf6d298892101c061d438b84a19 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/scsi/lpfc/lpfc_scsi.c