scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
59db5a931b
commit
a4413a5859
|
@ -4827,6 +4827,9 @@ megasas_host_device_list_query(struct megasas_instance *instance,
|
|||
*/
|
||||
count = le32_to_cpu(ci->count);
|
||||
|
||||
if (count > (MEGASAS_MAX_PD + MAX_LOGICAL_DRIVES_EXT))
|
||||
break;
|
||||
|
||||
if (megasas_dbg_lvl & LD_PD_DEBUG)
|
||||
dev_info(&instance->pdev->dev, "%s, Device count: 0x%x\n",
|
||||
__func__, count);
|
||||
|
|
Loading…
Reference in New Issue