android_kernel_motorola_sm6225/drivers/pinctrl/samsung
Thomas Gleixner 0cfc45cfdf pinctrl/samsung: Fix race in installing chained IRQ handler
Fix a race where a pending interrupt could be received and the handler
called before the handler's data has been setup, by converting to
irq_set_chained_handler_and_data().

Search and conversion was done with coccinelle:

@@
expression E1, E2, E3;
@@
(
-if (irq_set_chained_handler(E1, E3) != 0)
-   BUG();
|
-irq_set_chained_handler(E1, E3);
)
-irq_set_handler_data(E1, E2);
+irq_set_chained_handler_and_data(E1, E3, E2);

@@
expression E1, E2, E3;
@@
(
-if (irq_set_chained_handler(E1, E3) != 0)
-   BUG();
...
|
-irq_set_chained_handler(E1, E3);
...
)
-irq_set_handler_data(E1, E2);
+irq_set_chained_handler_and_data(E1, E3, E2);

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
2015-06-25 11:57:13 +02:00
..
Kconfig pinctrl: samsung: Group all drivers in a sub-dir 2014-07-11 14:08:40 +02:00
Makefile pinctrl: samsung: Group all drivers in a sub-dir 2014-07-11 14:08:40 +02:00
pinctrl-exynos.c pinctrl/exynos: Fix race in installing chained IRQ handler 2015-06-25 11:57:11 +02:00
pinctrl-exynos.h pinctrl: exynos: Add irq_chip instance for Exynos7 wakeup interrupts 2014-11-09 22:27:19 +09:00
pinctrl-exynos5440.c pinctrl: samsung: drop owner assignment from platform_drivers 2014-10-20 16:21:24 +02:00
pinctrl-s3c24xx.c pinctrl/samsung: Fix race in installing chained IRQ handler 2015-06-25 11:57:13 +02:00
pinctrl-s3c64xx.c pinctrl: samsung: Separate per-bank init and runtime data 2014-11-09 21:30:15 +09:00
pinctrl-samsung.c pinctrl: exynos: Add support for Exynos5433 2015-03-05 10:52:54 +01:00
pinctrl-samsung.h pinctrl: exynos: Add support for Exynos5433 2015-03-05 10:52:54 +01:00