Skip to content

Commit

Permalink
MIPS: OCTEON: fix out of bounds array access on CN68XX
Browse files Browse the repository at this point in the history
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+
  • Loading branch information
Aaro Koskinen authored and Paul Burton committed Nov 5, 2018
1 parent 6510223 commit c0fae7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/cavium-octeon/executive/cvmx-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0fae7e

Please sign in to comment.