scsi: mpi3mr: Use IRQ save variants of spinlock to protect chain frame allocation
authorRanjan Kumar <ranjan.kumar@broadcom.com>
Thu, 6 Apr 2023 10:18:19 +0000 (15:48 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Apr 2023 01:17:56 +0000 (21:17 -0400)
commit2acc635a0e5e91c267f2cb1c25748e8d06888e63
tree00573653251219386914116b65852c16a08ee3b6
parentb32283d75335d8263fc9f5ae16c8a196f1d8b5d5
scsi: mpi3mr: Use IRQ save variants of spinlock to protect chain frame allocation

Driver uses spin lock without irqsave when it needs to acquire a chain
frame. This is done to protect chain frame allocation from multiple
submission threads. If there is any I/O queued from an interrupt context,
and if that requires a chain frame, and if the chain lock is held by the CPU
which got interrupted, then there will be a possible deadlock.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://lore.kernel.org/r/20230406101819.10109-1-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr_os.c