Commit 32ab5d8a authored by Dave Carroll's avatar Dave Carroll Committed by Greg Kroah-Hartman

scsi: smartpqi: correct volume status

[ Upstream commit 7ff44499 ]

- fix race condition when a unit is deleted after an RLL,
  and before we have gotten the LV_STATUS page of the unit.
  - In this case we will get a standard inquiry, rather than
    the desired page.  This will result in a unit presented
    which no longer exists.
  - If we ask for LV_STATUS, insure we get LV_STATUS
Reviewed-by: default avatarMurthy Bhat <murthy.bhat@microsemi.com>
Reviewed-by: default avatarMahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: default avatarScott Teel <scott.teel@microsemi.com>
Reviewed-by: default avatarKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: default avatarDave Carroll <david.carroll@microsemi.com>
Signed-off-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8b6f057f
......@@ -1184,6 +1184,9 @@ static void pqi_get_volume_status(struct pqi_ctrl_info *ctrl_info,
if (rc)
goto out;
if (vpd->page_code != CISS_VPD_LV_STATUS)
goto out;
page_length = offsetof(struct ciss_vpd_logical_volume_status,
volume_status) + vpd->page_length;
if (page_length < sizeof(*vpd))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment