From: Nikita Shubin <[email protected]>
Without the terminator, if a con_id is passed to gpio_find() that
does not exist in the lookup table the function will not stop looping
correctly, and eventually cause an oops.
Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
Reported-by: Andy Shevchenko <[email protected]>
Signed-off-by: Nikita Shubin <[email protected]>
---
arch/arm/mach-ep93xx/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 71b113976420..8b1ec60a9a46 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -339,6 +339,7 @@ static struct gpiod_lookup_table ep93xx_i2c_gpiod_table = {
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
GPIO_LOOKUP_IDX("G", 0, NULL, 1,
GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+ { }
},
};
--
2.41.0
On Thu, Jan 18, 2024 at 9:22 AM Nikita Shubin via B4 Relay
<[email protected]> wrote:
> From: Nikita Shubin <[email protected]>
>
> Without the terminator, if a con_id is passed to gpio_find() that
> does not exist in the lookup table the function will not stop looping
> correctly, and eventually cause an oops.
>
> Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
> Reported-by: Andy Shevchenko <[email protected]>
> Signed-off-by: Nikita Shubin <[email protected]>
Sorry, my bug...
Reviewed-by: Linus Walleij <[email protected]>
Yours,
Linus Walleij
On Thu, Jan 18, 2024 at 11:20:44AM +0300, Nikita Shubin via B4 Relay wrote:
> From: Nikita Shubin <[email protected]>
>
> Without the terminator, if a con_id is passed to gpio_find() that
> does not exist in the lookup table the function will not stop looping
> correctly, and eventually cause an oops.
>
> Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
> Reported-by: Andy Shevchenko <[email protected]>
> Signed-off-by: Nikita Shubin <[email protected]>
I don't know how's the state of the series and when it's expected to go
in. Given this is a fix preventing a possible oops, I wonder if this one
should be taken already now?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Hi Arnd and all,
On Fri, 2024-01-19 at 00:52 +0100, Linus Walleij wrote:
> On Thu, Jan 18, 2024 at 9:22 AM Nikita Shubin via B4 Relay
> <[email protected]> wrote:
>
> > From: Nikita Shubin <[email protected]>
> >
> > Without the terminator, if a con_id is passed to gpio_find() that
> > does not exist in the lookup table the function will not stop looping
> > correctly, and eventually cause an oops.
> >
> > Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
> > Reported-by: Andy Shevchenko <[email protected]>
> > Signed-off-by: Nikita Shubin <[email protected]>
>
> Sorry, my bug...
> Reviewed-by: Linus Walleij <[email protected]>
Cc: [email protected]
Acked-by: Alexander Sverdlin <[email protected]>
Arnd, could you please take this into arm-soc?
I can send a PR, but this probably makes little sense for one patch?
--
Alexander Sverdlin.
On Mon, Feb 5, 2024, at 09:42, Alexander Sverdlin wrote:
> Hi Arnd and all,
>
> On Fri, 2024-01-19 at 00:52 +0100, Linus Walleij wrote:
>> On Thu, Jan 18, 2024 at 9:22 AM Nikita Shubin via B4 Relay
>> <[email protected]> wrote:
>>
>> > From: Nikita Shubin <[email protected]>
>> >
>> > Without the terminator, if a con_id is passed to gpio_find() that
>> > does not exist in the lookup table the function will not stop looping
>> > correctly, and eventually cause an oops.
>> >
>> > Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors")
>> > Reported-by: Andy Shevchenko <[email protected]>
>> > Signed-off-by: Nikita Shubin <[email protected]>
>>
>> Sorry, my bug...
>> Reviewed-by: Linus Walleij <[email protected]>
>
> Cc: [email protected]
> Acked-by: Alexander Sverdlin <[email protected]>
>
> Arnd, could you please take this into arm-soc?
> I can send a PR, but this probably makes little sense for one patch?
I'm travelling at the moment, but can take it when I get back.
If you want to be sure it doesn't get lost, please send the
patch (with the Acks) to [email protected] and it will end up
in patchwork.
Arnd
Thanks Arnd,
On Mon, 2024-02-05 at 10:02 +0000, Arnd Bergmann wrote:
> I'm travelling at the moment, but can take it when I get back.
>
> If you want to be sure it doesn't get lost, please send the
> patch (with the Acks) to [email protected] and it will end up
> in patchwork.
I'll do it!
--
Alexander Sverdlin.