lkml.org 
[lkml]   [2021]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] pinctrl: microchip: fix array overflow
Date

Linus Walleij writes:

> On Tue, Mar 23, 2021 at 2:10 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> Building with 'make W=1' shows an array overflow:
>>
>> drivers/pinctrl/pinctrl-microchip-sgpio.c: In function 'microchip_sgpio_irq_settype':
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:154:39: error: array subscript 10 is above array bounds of 'const u8[10]' {aka 'const unsigned char[10]'} [-Werror=array-bounds]
>> 154 | u32 regoff = priv->properties->regoff[rno] + off;
>> | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
>> drivers/pinctrl/pinctrl-microchip-sgpio.c:55:5: note: while referencing 'regoff'
>> 55 | u8 regoff[MAXREG];
>> | ^~~~~~
>>
>> It's not clear to me what was meant here, my best guess is that the
>> offset should have been applied to the third argument instead of the
>> second.
>>
>> Fixes: be2dc859abd4 ("pinctrl: pinctrl-microchip-sgpio: Add irq support (for sparx5)")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Patch applied.
>
> Yours,
> Linus Walleij

I don't understand - I submitted a fix for this already in February
(reported by Gustavo). It took some time for you to get it ack'ed - but
you did (Feb 1st).

Did it end up getting dropped?

---Lars


--
Lars Povlsen,
Microchip

\
 
 \ /
  Last update: 2021-03-28 19:20    [W:0.061 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site