Skip to content

Commit c0fae7e

Browse files
aakoskinpaulburton
authored andcommitted
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: 2c8c3f0 ("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+
1 parent 6510223 commit c0fae7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/cavium-octeon/executive/cvmx-helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) (int pko_port,
6767
void (*cvmx_override_ipd_port_setup) (int ipd_port);
6868

6969
/* Port count per interface */
70-
static int interface_port_count[5];
70+
static int interface_port_count[9];
7171

7272
/**
7373
* Return the number of interfaces the chip has. Each interface

0 commit comments

Comments
 (0)