This is a note to let you know that I've just added the patch titled
gpio: fix sleep-while-atomic in gpiochip_remove
to the 3.18-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:
gpio-fix-sleep-while-atomic-in-gpiochip_remove.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 6798acaa0138d8b12f1c54402ebcb66fea3deb03 Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Mon, 12 Jan 2015 17:12:28 +0100
Subject: gpio: fix sleep-while-atomic in gpiochip_remove
From: Johan Hovold <[email protected]>
commit 6798acaa0138d8b12f1c54402ebcb66fea3deb03 upstream.
Move direct and indirect calls to gpiochip_remove_pin_ranges outside of
spin lock as they can end up taking a mutex in pinctrl_remove_gpio_range.
Note that the pin ranges are already added outside of the lock.
Fixes: 9ef0d6f7628b ("gpiolib: call pin removal in chip removal function")
Fixes: f23f1516b675 ("gpiolib: provide provision to register pin ranges")
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpio/gpiolib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -319,12 +319,10 @@ void gpiochip_remove(struct gpio_chip *c
gpiochip_irqchip_remove(chip);
acpi_gpiochip_remove(chip);
-
- spin_lock_irqsave(&gpio_lock, flags);
-
gpiochip_remove_pin_ranges(chip);
of_gpiochip_remove(chip);
+ spin_lock_irqsave(&gpio_lock, flags);
for (id = 0; id < chip->ngpio; id++) {
if (test_bit(FLAG_REQUESTED, &chip->desc[id].flags))
dev_crit(chip->dev, "REMOVING GPIOCHIP WITH GPIOS STILL
REQUESTED\n");
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/gpio-fix-memory-and-reference-leaks-in-gpiochip_add-error-path.patch
queue-3.18/pinctrl-lantiq-remove-bogus-of_gpio_chip_add.patch
queue-3.18/gpio-sysfs-fix-gpio-device-attribute-leak.patch
queue-3.18/gpio-fix-memory-leak-and-sleep-while-atomic.patch
queue-3.18/gpio-sysfs-fix-gpio-chip-device-attribute-leak.patch
queue-3.18/gpio-fix-sleep-while-atomic-in-gpiochip_remove.patch
queue-3.18/leds-netxbig-fix-oops-at-probe-time.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html