From 34711f941c4a212e3bdf3b993ff6bfe1d21e4594 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 10 Jul 2014 19:28:37 +0000 Subject: octeon: backport a few upstream fixes Signed-off-by: Felix Fietkau git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41568 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...ium-octeon-fix-out-of-bounds-array-access.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch (limited to 'target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch') diff --git a/target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch b/target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch new file mode 100644 index 0000000000..78194bf261 --- /dev/null +++ b/target/linux/octeon/patches-3.10/0008-MIPS-cavium-octeon-fix-out-of-bounds-array-access.patch @@ -0,0 +1,28 @@ +From 8b75e77048a378339ada86eff548a5b253212859 Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Fri, 1 Nov 2013 17:06:03 +0200 +Subject: [PATCH] MIPS: cavium-octeon: fix out-of-bounds array access + +When booting with in-kernel DTBs, the pruning code will enumerate +interfaces 0-4. However, there is memory reserved only for 4 so some +other data will get overwritten by cvmx_helper_interface_enumerate(). + +Signed-off-by: Aaro Koskinen +Acked-by: David Daney +Signed-off-by: John Crispin +Patchwork: http://patchwork.linux-mips.org/patch/6102/ +--- + 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[4] = { 0, 0, 0, 0 }; ++static int interface_port_count[5]; + + /* Port last configured link info index by IPD/PKO port */ + static cvmx_helper_link_info_t -- cgit v1.2.3