scsi: mpt3sas: Fix deadlock while cancelling the running firmware event
authorSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
Tue, 18 May 2021 05:16:23 +0000 (10:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:40 +0000 (16:05 +0200)
commitb4fd2ab0a91b7ccfa8024a1c3ff7d71904857950
tree042ab66de86b4668994e762dc2bc39ac9efdfebc
parent7a80f71601af015856a0aeb1e3c294037ac3dd32
scsi: mpt3sas: Fix deadlock while cancelling the running firmware event

[ Upstream commit e2fac6c44ae06e58ac02181b048af31195883c31 ]

Do not cancel current running firmware event work if the event type is
different from MPT3SAS_REMOVE_UNRESPONDING_DEVICES.  Otherwise a deadlock
can be observed while cancelling the current firmware event work if a hard
reset operation is called as part of processing the current event.

Link: https://lore.kernel.org/r/20210518051625.1596742-2-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/mpt3sas/mpt3sas_scsih.c