From: Aaro Koskinen Date: Fri, 1 Nov 2013 15:06:03 +0000 (+0200) Subject: MIPS: cavium-octeon: fix out-of-bounds array access X-Git-Tag: v3.14-rc1~37^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b75e77048a378339ada86eff548a5b253212859;p=platform%2Fkernel%2Flinux-exynos.git 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/ --- diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c index d63d20d..0e4b340 100644 --- 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) (int pko_port, 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