diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-08-09 06:01:55 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-13 04:34:07 +0300 |
commit | dc6d6d34e1f674b39d91454fca2b826e190e0351 (patch) | |
tree | ea7acb98da5b5c89bcafbebb9b0341b1b3ef10f1 /drivers/scsi/qla2xxx/qla_attr.c | |
parent | fcef08932db7770cc176555ac2f08574b1e43af6 (diff) | |
download | linux-dc6d6d34e1f674b39d91454fca2b826e190e0351.tar.xz |
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.c | 3 |
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 |