[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200508123126.529643159@linuxfoundation.org>
Date: Fri, 8 May 2020 14:30:20 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>,
David Daney <david.daney@...ium.com>,
Rob Herring <robh@...nel.org>,
Marc Zyngier <marc.zyngier@....com>, linux-mips@...ux-mips.org,
kernel-janitors@...r.kernel.org, Ralf Baechle <ralf@...ux-mips.org>
Subject: [PATCH 4.4 029/312] MIPS: Octeon: Off by one in octeon_irq_gpio_map()
From: Dan Carpenter <dan.carpenter@...cle.com>
commit 008d0cf1ec69ec6d2c08f2d23aff2b67cbe5d2af upstream.
It should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
Fixes: 64b139f97c01 ('MIPS: OCTEON: irq: add CIB and other fixes')
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Acked-by: David Daney <david.daney@...ium.com>
Cc: Rob Herring <robh@...nel.org>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: linux-mips@...ux-mips.org
Cc: kernel-janitors@...r.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13813/
Signed-off-by: Ralf Baechle <ralf@...ux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/mips/cavium-octeon/octeon-irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -1220,7 +1220,7 @@ static int octeon_irq_gpio_map(struct ir
line = (hw + gpiod->base_hwirq) >> 6;
bit = (hw + gpiod->base_hwirq) & 63;
- if (line > ARRAY_SIZE(octeon_irq_ciu_to_irq) ||
+ if (line >= ARRAY_SIZE(octeon_irq_ciu_to_irq) ||
octeon_irq_ciu_to_irq[line][bit] != 0)
return -EINVAL;
Powered by blists - more mailing lists