summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahesh Rajashekhara <mahesh.rajashekhara@microchip.com>2024-08-27 13:54:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-10 12:00:32 +0200
commitb8ddd0d6f57e3c87e90cafd4ed108d004c7e1582 (patch)
treef626d42a6c3a96452ad85f3fbf52363e9cac9625
parentcb0eb10558802764f07de1dc439c4609e27cb4f0 (diff)
downloadlinux-stable-b8ddd0d6f57e3c87e90cafd4ed108d004c7e1582.tar.gz
linux-stable-b8ddd0d6f57e3c87e90cafd4ed108d004c7e1582.tar.bz2
linux-stable-b8ddd0d6f57e3c87e90cafd4ed108d004c7e1582.zip
scsi: smartpqi: correct stream detection
[ Upstream commit 4c76114932d1d6fad2e72823e7898a3c960cf2a7 ] Correct stream detection by initializing the structure pqi_scsi_dev_raid_map_data to 0s. When the OS issues SCSI READ commands, the driver erroneously considers them as SCSI WRITES. If they are identified as sequential IOs, the driver then submits those requests via the RAID path instead of the AIO path. The 'is_write' flag might be set for SCSI READ commands also. The driver may interpret SCSI READ commands as SCSI WRITE commands, resulting in IOs being submitted through the RAID path. Note: This does not cause data corruption. Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Link: https://lore.kernel.org/r/20240827185501.692804-3-don.brace@microchip.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 02d16fddd312..a4719af88718 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -5917,7 +5917,7 @@ static bool pqi_is_parity_write_stream(struct pqi_ctrl_info *ctrl_info,
int rc;
struct pqi_scsi_dev *device;
struct pqi_stream_data *pqi_stream_data;
- struct pqi_scsi_dev_raid_map_data rmd;
+ struct pqi_scsi_dev_raid_map_data rmd = { 0 };
if (!ctrl_info->enable_stream_detection)
return false;