summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-08-08 20:01:55 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-12 21:34:07 -0400
commitdc6d6d34e1f674b39d91454fca2b826e190e0351 (patch)
treeea7acb98da5b5c89bcafbebb9b0341b1b3ef10f1 /drivers/scsi/qla2xxx/qla_attr.c
parentfcef08932db7770cc176555ac2f08574b1e43af6 (diff)
scsi: qla2xxx: Check the PCI info string output buffer size
Pass the output buffer size to the code that generates a PCI info string and check the output buffer size while generating a PCI info string. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index e3de20918efb..e9c449ef515c 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1125,7 +1125,8 @@ qla2x00_pci_info_show(struct device *dev, struct device_attribute *attr,
char pci_info[30];
return scnprintf(buf, PAGE_SIZE, "%s\n",
- vha->hw->isp_ops->pci_info_str(vha, pci_info));
+ vha->hw->isp_ops->pci_info_str(vha, pci_info,
+ sizeof(pci_info)));
}
static ssize_t