linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: OCTEON: fix out of bounds array access on CN68XX
@ 2018-10-26 22:46 Aaro Koskinen
  2018-11-05 18:07 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Aaro Koskinen @ 2018-10-26 22:46 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, linux-mips, linux-kernel; +Cc: Aaro Koskinen

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 <aaro.koskinen@iki.fi>
---
 arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c
index 75108ec669eb..6c79e8a16a26 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[5];
+static int interface_port_count[9];
 
 /**
  * Return the number of interfaces the chip has. Each interface
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: OCTEON: fix out of bounds array access on CN68XX
  2018-10-26 22:46 [PATCH] MIPS: OCTEON: fix out of bounds array access on CN68XX Aaro Koskinen
@ 2018-11-05 18:07 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2018-11-05 18:07 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: Ralf Baechle, linux-mips, linux-kernel

Hi Aaro,

On Sat, Oct 27, 2018 at 01:46:34AM +0300, Aaro Koskinen wrote:
> 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 <aaro.koskinen@iki.fi>
> ---
>  arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks - applied to mips-fixes.

Paul

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-05 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26 22:46 [PATCH] MIPS: OCTEON: fix out of bounds array access on CN68XX Aaro Koskinen
2018-11-05 18:07 ` Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).