[lkml]   [2018]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] gpio: ml-ioh: Fix buffer underwrite on probe error path
On Mon, Jul 23, 2018 at 6:54 PM Anton Vasilyev <> wrote:

> If ioh_gpio_probe() fails on devm_irq_alloc_descs() then chip may point
> to any element of chip_save array, so reverse iteration from pointer chip
> may become chip_save[-1] and gpiochip_remove() will operate with wrong
> memory.
> The patch fix the error path of ioh_gpio_probe() to correctly bypass
> chip_save array.
> Found by Linux Driver Verification project (
> Signed-off-by: Anton Vasilyev <>

Patch applied, nice work!

Linus Walleij

 \ /
  Last update: 2018-07-29 23:14    [W:0.031 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site