summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2018-10-27 01:46:34 +0300
committerPaul Burton <paul.burton@mips.com>2018-11-05 21:03:35 +0300
commitc0fae7e2452b90c31edd2d25eb3baf0c76b400ca (patch)
tree7c60b9d8d853385be06e26c07675e7673ec50a6c /arch/mips
parent651022382c7f8da46cb4872a545ee1da6d097d2a (diff)
downloadlinux-c0fae7e2452b90c31edd2d25eb3baf0c76b400ca.tar.xz
MIPS: OCTEON: fix out of bounds array access on CN68XX
The maximum number of interfaces is returned by cvmx_helper_get_number_of_interfaces(), and the value is used to access interface_port_count[]. When CN68XX support was added, we forgot to increase the array size. Fix that. Fixes: 2c8c3f0201333 ("MIPS: Octeon: Support additional interfaces on CN68XX") Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/20949/ Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v4.3+
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/cavium-octeon/executive/cvmx-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 75108ec669eb..6c79e8a16a26 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c
@@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) (int pko_port,
void (*cvmx_override_ipd_port_setup) (int ipd_port);
/* Port count per interface */
-static int interface_port_count[5];
+static int interface_port_count[9];
/**
* Return the number of interfaces the chip has. Each interface