[lkml]   [2018]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.4 073/160] MIPS: OCTEON: fix out of bounds array access on CN68XX
4.4-stable review patch.  If anyone has any objections, please let me know.


From: Aaro Koskinen <>

commit c0fae7e2452b90c31edd2d25eb3baf0c76b400ca upstream.

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 <>
Signed-off-by: Paul Burton <>
Cc: Ralf Baechle <>
Cc: # v4.3+
Signed-off-by: Greg Kroah-Hartman <>

arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- 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)
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];

/* Port last configured link info index by IPD/PKO port */
static cvmx_helper_link_info_t

 \ /
  Last update: 2018-11-19 18:22    [W:0.468 / U:2.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site