* Patch "powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function" has been added to the 4.11-stable tree
@ 2017-06-12 12:48 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-12 12:48 UTC (permalink / raw)
To: christophe.leroy, gregkh, linus.walleij, mpe; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-sysdev-simple_gpio-fix-oops-in-gpio-save_regs-function.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 6f553912eedafae13ff20b322a65e471fe7f5236 Mon Sep 17 00:00:00 2001
From: Christophe Leroy <christophe.leroy@c-s.fr>
Date: Wed, 24 May 2017 10:01:55 +0200
Subject: powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function
From: Christophe Leroy <christophe.leroy@c-s.fr>
commit 6f553912eedafae13ff20b322a65e471fe7f5236 upstream.
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: 937daafca774 ("powerpc: simple-gpio: use gpiochip data pointer")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/sysdev/simple_gpio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/powerpc/sysdev/simple_gpio.c
+++ b/arch/powerpc/sysdev/simple_gpio.c
@@ -75,7 +75,8 @@ static int u8_gpio_dir_out(struct gpio_c
static void u8_gpio_save_regs(struct of_mm_gpio_chip *mm_gc)
{
- struct u8_gpio_chip *u8_gc = gpiochip_get_data(&mm_gc->gc);
+ struct u8_gpio_chip *u8_gc =
+ container_of(mm_gc, struct u8_gpio_chip, mm_gc);
u8_gc->data = in_8(mm_gc->regs);
}
Patches currently in stable-queue which might be from christophe.leroy@c-s.fr are
queue-4.11/powerpc-sysdev-simple_gpio-fix-oops-in-gpio-save_regs-function.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-12 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 12:48 Patch "powerpc/sysdev/simple_gpio: Fix oops in gpio save_regs function" has been added to the 4.11-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).