]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: megaraid_sas: Fix for a potential deadlock
authorTomas Henzl <thenzl@redhat.com>
Mon, 23 Sep 2024 17:48:33 +0000 (19:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:30:51 +0000 (10:30 +0100)
commitedadc693bfcc0f1ea08b8fa041c9361fd042410d
tree49421db80349862cd34ce8e4f220d7e32fd96ae4
parent7aafb0c40088bdf20768bae0dda35377871a8253
scsi: megaraid_sas: Fix for a potential deadlock

[ Upstream commit 50740f4dc78b41dec7c8e39772619d5ba841ddd7 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/megaraid/megaraid_sas_base.c