mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
scsi: megaraid_sas: Fix for a potential deadlock
This fixes a 'possible circular locking dependency detected' warning CPU0 CPU1 ---- ---- lock(&instance->reset_mutex); lock(&shost->scan_mutex); lock(&instance->reset_mutex); lock(&shost->scan_mutex); Fix this by temporarily releasing the reset_mutex. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Link: https://lore.kernel.org/r/20240923174833.45345-1-thenzl@redhat.com Acked-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
2c354d1230
commit
50740f4dc7
1 changed files with 4 additions and 1 deletions
|
@ -8907,8 +8907,11 @@ megasas_aen_polling(struct work_struct *work)
|
|||
(ld_target_id / MEGASAS_MAX_DEV_PER_CHANNEL),
|
||||
(ld_target_id % MEGASAS_MAX_DEV_PER_CHANNEL),
|
||||
0);
|
||||
if (sdev1)
|
||||
if (sdev1) {
|
||||
mutex_unlock(&instance->reset_mutex);
|
||||
megasas_remove_scsi_device(sdev1);
|
||||
mutex_lock(&instance->reset_mutex);
|
||||
}
|
||||
|
||||
event_type = SCAN_VD_CHANNEL;
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue