mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
scsi: smartpqi: correct volume status
[ Upstream commit 7ff44499ba
]
- 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: Murthy Bhat <murthy.bhat@microsemi.com>
Reviewed-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
07b3f3c568
commit
a3e537395c
1 changed files with 3 additions and 0 deletions
|
@ -983,6 +983,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))
|
||||
|
|
Loading…
Reference in a new issue