diff options
author | Anton Vasilyev <vasilyev@ispras.ru> | 2018-07-23 19:53:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-19 22:48:58 +0200 |
commit | 931ed0a5d3d7bc51947aaa379b8eff2d629cae49 (patch) | |
tree | d4852c0f4d520fd334228d16fc62ff7ebedf22e6 /drivers/net | |
parent | cf8f39692c14db469b90299a33968eb2822bd732 (diff) |
gpio: ml-ioh: Fix buffer underwrite on probe error path
[ Upstream commit 4bf4eed44bfe288f459496eaf38089502ef91a79 ]
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 (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions