Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359466
b: refs/heads/master
c: 0a630c2
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Jan 30, 2013
1 parent 799bf23 commit 89816c2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 962bc51b04b2725639c47c49404943516ac32b11
refs/heads/master: 0a630c2788e87c65d1ac5ff23bbea10a3b1fbc30
28 changes: 28 additions & 0 deletions trunk/drivers/scsi/lpfc/lpfc_sli.c
Original file line number Diff line number Diff line change
Expand Up @@ -5639,6 +5639,13 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba)
}
/* RPIs. */
count = phba->sli4_hba.max_cfg_param.max_rpi;
if (count <= 0) {
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"3279 Invalid provisioning of "
"rpi:%d\n", count);
rc = -EINVAL;
goto err_exit;
}
base = phba->sli4_hba.max_cfg_param.rpi_base;
longs = (count + BITS_PER_LONG - 1) / BITS_PER_LONG;
phba->sli4_hba.rpi_bmask = kzalloc(longs *
Expand All @@ -5661,6 +5668,13 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba)

/* VPIs. */
count = phba->sli4_hba.max_cfg_param.max_vpi;
if (count <= 0) {
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"3280 Invalid provisioning of "
"vpi:%d\n", count);
rc = -EINVAL;
goto free_rpi_ids;
}
base = phba->sli4_hba.max_cfg_param.vpi_base;
longs = (count + BITS_PER_LONG - 1) / BITS_PER_LONG;
phba->vpi_bmask = kzalloc(longs *
Expand All @@ -5683,6 +5697,13 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba)

/* XRIs. */
count = phba->sli4_hba.max_cfg_param.max_xri;
if (count <= 0) {
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"3281 Invalid provisioning of "
"xri:%d\n", count);
rc = -EINVAL;
goto free_vpi_ids;
}
base = phba->sli4_hba.max_cfg_param.xri_base;
longs = (count + BITS_PER_LONG - 1) / BITS_PER_LONG;
phba->sli4_hba.xri_bmask = kzalloc(longs *
Expand All @@ -5706,6 +5727,13 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba)

/* VFIs. */
count = phba->sli4_hba.max_cfg_param.max_vfi;
if (count <= 0) {
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
"3282 Invalid provisioning of "
"vfi:%d\n", count);
rc = -EINVAL;
goto free_xri_ids;
}
base = phba->sli4_hba.max_cfg_param.vfi_base;
longs = (count + BITS_PER_LONG - 1) / BITS_PER_LONG;
phba->sli4_hba.vfi_bmask = kzalloc(longs *
Expand Down

0 comments on commit 89816c2

Please sign in to comment.