]> git.ipfire.org Git - thirdparty/linux.git/commit - drivers/scsi/megaraid/megaraid_sas_base.c
scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout
authorChandrakanth Patil <chandrakanth.patil@broadcom.com>
Tue, 25 Jun 2019 11:04:23 +0000 (16:34 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 27 Jun 2019 04:07:35 +0000 (00:07 -0400)
commit7fa3174b3ef4e517ebb8a08078871ceab705a969
tree62b4274ce4e25bfe7333c4c3ac2f89a2b1ce3ae5
parenta6ffd5bf681905729a4926cb3006d0329dd5d857
scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout

Issue: There is possibility of few DCMDs timing out with 'reset_mutex' lock
held. As part of DCMD timeout handling, driver calls function
megasas_reset_fusion which also tries to acquire same lock 'reset_mutex'
and end up with deadlock.

Fix: Upon timeout of DCMDs (which are fired with 'reset_mutex' lock held),
driver will release 'reset_mutex' before calling OCR function and will
acquire lock again after OCR function returns.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c