powerpc: sysdev: simple_gpio: fix Oops in gpio save_regs function

Michael Ellerman patch-notifications at ellerman.id.au
Thu Jun 1 23:31:08 AEST 2017


On Wed, 2017-05-24 at 08:01:55 UTC, Christophe Leroy wrote:
> of_mm_gpiochip_add_data() generates an Oops for NULL pointer dereference.
> 
> of_mm_gpiochip_add_data() calls mm_gc->save_regs() before
> setting the data, therefore ->save_regs() cannot use gpiochip_get_data()
> 
> Fixes: 937daafca774b ("powerpc: simple-gpio: use gpiochip data pointer")
> Cc: stable at vger.kernel.org
> 
> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
> Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/6f553912eedafae13ff20b322a65e4

cheers


More information about the Linuxppc-dev mailing list