MIPS: OCTEON: fix out of bounds array access on CN68XX
authorAaro Koskinen <aaro.koskinen@iki.fi>
Fri, 26 Oct 2018 22:46:34 +0000 (01:46 +0300)
committerPaul Burton <paul.burton@mips.com>
Mon, 5 Nov 2018 18:03:35 +0000 (10:03 -0800)
commitc0fae7e2452b90c31edd2d25eb3baf0c76b400ca
tree7c60b9d8d853385be06e26c07675e7673ec50a6c
parent651022382c7f8da46cb4872a545ee1da6d097d2a
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+
arch/mips/cavium-octeon/executive/cvmx-helper.c