Re: [PATCH v1 1/1] pinctrl: at91: Fix possible out-of-boundary access

From: Andy Shevchenko
Date: Sat May 10 2025 - 14:32:15 EST


Thu, May 08, 2025 at 11:08:07PM +0300, Andy Shevchenko kirjoitti:
> at91_gpio_probe() doesn't check that given OF alias is not available or
> something went wrong when trying to get it. This might have consequences
> when accessing gpio_chips array with that value as an index. Note, that
> BUG() can be compiled out and hence won't actually perform the required
> checks.

Also
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/r/202505052343.UHF1Zo93-lkp@xxxxxxxxx/

> Fixes: 6732ae5cb47c ("ARM: at91: add pinctrl support")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko