From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A64C1ABEDF; Mon, 14 Oct 2024 15:16:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918996; cv=none; b=ZB5XtpzaYz8g22kLYlYGJ/HvWwb5b9npMno5KrFhbhSH6NN008YXAKQf4SsWRjKHx9qbY2dDNdNrNTyRxVrP7ouecu7Y5Ttzu9n/jL711tDuiNHvHTj6qDsohmJRIDMyAYIEGYkeAlpTn/9H3bTGdpPxDWuA29IWAzIH0ZWB+os= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728918996; c=relaxed/simple; bh=/9Vid/P7ZRwGPK1McQC3aFHMUpNXSpRFY9UOtISnb0M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QmmxCxINdN2D0/2AstbMUBs61wXj7dI/9HoFOZZZN4DaNUrCnKdjZJHqRr/uAmCxzESOFnfR1VLjbUpvZ8nP98Xm+ACQ7EPKHIC8mLGkxSqyZiiNKL5Id0ztWjv9r5LfSyKDbtWZJ/CgtTl441WsERA1mQRuPA0iaSSY8SYyCxs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XVT13/LA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XVT13/LA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEEC3C4CED3; Mon, 14 Oct 2024 15:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728918996; bh=/9Vid/P7ZRwGPK1McQC3aFHMUpNXSpRFY9UOtISnb0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XVT13/LAhHyK7BSjVoKWiRBmp3FpFs+nPF0t/Nc/1qen0netnICdEOSdq/QfouTWh V0/Oa63MD58QM4o17TXAkkFErpX2l3MH+Rjf2yvYe/XV5voPHkMFiOYoQ4A7iNbH2P IpmK/b/uHnrtWssnnfpMaZ2WUlXdXO3WSx5TL5IQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Scott Benesh , Scott Teel , Mike McGowen , Mahesh Rajashekhara , Don Brace , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 6.1 483/798] scsi: smartpqi: correct stream detection Date: Mon, 14 Oct 2024 16:17:17 +0200 Message-ID: <20241014141236.948440312@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241014141217.941104064@linuxfoundation.org> References: <20241014141217.941104064@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mahesh Rajashekhara [ 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 Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20240827185501.692804-3-don.brace@microchip.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/smartpqi/smartpqi_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 4a004e0c93690..0b3aa91b46ffb 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -5902,7 +5902,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; -- 2.43.0