linux/drivers/scsi/mpi3mr
Ranjan Kumar 65ba18c84d scsi: mpi3mr: Synchronous access b/w reset and tm thread for reply queue
[ Upstream commit f195fc060c ]

When the task management thread processes reply queues while the reset
thread resets them, the task management thread accesses an invalid queue ID
(0xFFFF), set by the reset thread, which points to unallocated memory,
causing a crash.

Add flag 'io_admin_reset_sync' to synchronize access between the reset,
I/O, and admin threads. Before a reset, the reset handler sets this flag to
block I/O and admin processing threads. If any thread bypasses the initial
check, the reset thread waits up to 10 seconds for processing to finish. If
the wait exceeds 10 seconds, the controller is marked as unrecoverable.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://lore.kernel.org/r/20250129100850.25430-4-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-04-20 10:15:17 +02:00
..
mpi scsi: mpi3mr: Update MPI Headers to revision 34 2024-09-12 21:10:13 -04:00
Kconfig scsi: mpi3mr: Select CONFIG_SCSI_SAS_ATTRS 2022-10-22 03:14:51 +00:00
Makefile scsi: mpi3mr: Refer CONFIG_SCSI_MPI3MR in Makefile 2022-12-14 03:01:38 +00:00
mpi3mr.h scsi: mpi3mr: Synchronous access b/w reset and tm thread for reply queue 2025-04-20 10:15:17 +02:00
mpi3mr_app.c scsi: mpi3mr: Avoid reply queue full condition 2025-04-20 10:15:16 +02:00
mpi3mr_debug.h scsi: mpi3mr: Update copyright year 2023-03-16 23:54:29 -04:00
mpi3mr_fw.c scsi: mpi3mr: Synchronous access b/w reset and tm thread for reply queue 2025-04-20 10:15:17 +02:00
mpi3mr_os.c scsi: mpi3mr: Start controller indexing from 0 2025-01-02 10:34:19 +01:00
mpi3mr_transport.c scsi: mpi3mr: Validate SAS port assignments 2024-10-15 22:17:17 -04:00