Re: [PATCH] pinctrl: mediatek: Fix some off by one bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/02/2020 21:24, Matthias Brugger wrote:
> 
> 
> On 20/02/2020 16:14, Linus Walleij wrote:
>> On Tue, Feb 18, 2020 at 6:55 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>>
>>> These comparisons should be >= instead of > to prevent accessing one
>>> element beyond the end of the hw->soc->pins[] array.
>>>
>>> Fixes: 3de7deefce69 ("pinctrl: mediatek: Check gpio pin number and use binary search in mtk_hw_pin_field_lookup()")
>>> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>>
>> Matthias could you have a look at this patch?
>>
> 
> From what I see hw->soc->npins is the ARRAY_SIZE() of the pins. So the index
> should smaller hw->soc->npins.
> 
> Reviewed-by: Matthias Brugger <matthias.bgg@xxxxxxxxx>
> 

Actually missing a second
Fixes: 184d8e13f9b1 ("pinctrl: mediatek: Add support for pin configuration dump
via debugfs.")


Regards,
Matthias



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux