linux/drivers/pinctrl
Thomas Gleixner 1b11b0cb79 pinctrl/st: 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: Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
Cc: Maxime Coquelin <maxime.coquelin@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kernel@stlinux.com
Cc: linux-gpio@vger.kernel.org
2015-06-25 11:57:09 +02:00
..
bcm pinctrl: cygnus: fixed incorrect GPIO-pin mapping 2015-05-19 10:45:11 +02:00
berlin pinctrl: berlin: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
freescale pinctrl: fsl: imx: Check for 0 config register 2015-04-07 15:11:00 +02:00
intel pinctrl: cherryview: Read triggering type from HW if not set when requested 2015-05-12 13:54:32 +02:00
mediatek pinctrl/mediatek: Fix race in installing chained IRQ handler 2015-06-25 11:57:04 +02:00
meson pinctrl: Fix gpio/pin mapping for Meson8b 2015-05-19 11:40:52 +02:00
mvebu pinctrl: mvebu: Fix mapping of pin 63 (gpo -> gpio) 2015-04-27 15:23:58 +02:00
nomadik pinctrl: fix allmodconfig noise 2015-04-15 10:02:42 +02:00
qcom These are some GPIO fixes for the v4.1 series: 2015-05-08 19:42:59 -07:00
samsung pinctrl: exynos: Remove eint_gpio_init call-back for exynos7 alive pinctrl block 2015-03-18 02:02:19 +01:00
sh-pfc sh-pfc: r8a7790: add EtherAVB pin groups 2015-04-07 15:21:26 +02:00
sirf pinctrl: sirf: move sgpio lock into state container 2015-04-09 10:16:13 +02:00
spear Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sunxi This is the bulk of pin control changes for the v4.1 development 2015-04-14 17:58:15 -07:00
vt8500 pinctrl: constify of_device_id array 2015-03-27 09:58:35 +01:00
core.c pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-06 16:24:28 +02:00
core.h pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-06 16:24:28 +02:00
devicetree.c pinctrl: Don't just pretend to protect pinctrl_maps, do it for real 2015-05-06 16:24:28 +02:00
devicetree.h pinctrl: core device tree mapping table parsing support 2012-04-18 13:53:10 +02:00
Kconfig pinctrl: fix allmodconfig noise 2015-04-15 10:02:42 +02:00
Makefile pinctrl: add AMD GPIO driver support. 2015-03-18 02:02:21 +01:00
pinconf-generic.c pinctrl: pinconf-generic: add dt node names to error messages 2015-03-27 09:53:10 +01:00
pinconf.c pinctrl: pinconf-generic: Allow driver to specify DT params 2015-01-11 22:32:19 +01:00
pinconf.h pinctrl: pinconf-generic: Allow driver to specify DT params 2015-01-11 22:32:19 +01:00
pinctrl-adi2-bf54x.c pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-adi2-bf60x.c pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-adi2.c pinctrl/adi2: Fix race in installing chained IRQ handler 2015-06-25 11:57:07 +02:00
pinctrl-adi2.h pinctrl: pinctrl-adi: combine multiple groups of one function together 2014-02-25 10:49:13 +01:00
pinctrl-amd.c Fix inconsistent spinlock of AMD GPIO driver which can be 2015-04-07 11:36:49 +02:00
pinctrl-amd.h Fix inconsistent spinlock of AMD GPIO driver which can be 2015-04-07 11:36:49 +02:00
pinctrl-as3722.c pinctrl: constify of_device_id array 2015-03-27 09:58:35 +01:00
pinctrl-at91.c This is the bulk of pin control changes for the v4.1 development 2015-04-14 17:58:15 -07:00
pinctrl-at91.h pinctrl: at91: use own header 2014-10-29 09:28:35 +01:00
pinctrl-coh901.c pinctrl: remove all usage of gpio_remove ret val in driver/pinctl 2014-07-22 16:34:12 +02:00
pinctrl-coh901.h
pinctrl-falcon.c staging: drivers: pinctrl: Fixed checkpatch.pl warnings 2015-01-21 11:02:26 +01:00
pinctrl-lantiq.c pinctrl: clean up after enable refactoring 2014-09-04 10:05:07 +02:00
pinctrl-lantiq.h pinctrl: lantiq: fix include guard #endif comment 2015-03-09 18:10:57 +01:00
pinctrl-palmas.c pinctrl: constify of_device_id array 2015-03-27 09:58:35 +01:00
pinctrl-rockchip.c pinctrl: rockchip: Only mask interrupts; never disable 2015-01-30 10:38:36 +01:00
pinctrl-single.c pinctrl: constify of_device_id array 2015-03-27 09:58:35 +01:00
pinctrl-st.c pinctrl/st: Fix race in installing chained IRQ handler 2015-06-25 11:57:09 +02:00
pinctrl-tb10x.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pinctrl-tegra20.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra30.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra114.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra124.c pinctrl: tegra: some bits move between registers 2015-03-09 18:10:58 +01:00
pinctrl-tegra210.c pinctrl: tegra: add a driver for Tegra210 2015-03-09 18:10:59 +01:00
pinctrl-tegra-xusb.c USB patches for 3.19-rc1 2014-12-14 14:57:16 -08:00
pinctrl-tegra.c pinctrl: tegra: support nvidia,io-hv DT property 2015-03-09 18:10:58 +01:00
pinctrl-tegra.h pinctrl: tegra: use signed bitfields for optional fields 2015-03-19 09:20:17 +01:00
pinctrl-tz1090-pdc.c pinctrl: constify of_device_id array 2015-03-27 09:58:35 +01:00
pinctrl-tz1090.c pinctrl: constify of_device_id array 2015-03-27 09:58:35 +01:00
pinctrl-u300.c pinctrl: drop owner assignment from platform_drivers 2014-10-20 16:21:21 +02:00
pinctrl-utils.c pinctrl: utils: include export.h to avoid warnings 2013-08-28 15:50:33 +02:00
pinctrl-utils.h pinctrl: add utility functions for add map/configs 2013-08-14 21:00:41 +02:00
pinctrl-xway.c pinctrl: lantiq: remove bogus of_gpio_chip_add 2015-01-14 14:20:46 +01:00
pinctrl-zynq.c pinctrl: hide PCONFDUMP in #ifdef 2015-01-30 14:30:59 +01:00
pinmux.c pinctrl: clean up after enable refactoring 2014-09-04 10:05:07 +02:00
pinmux.h pinctrl: ifdef CONFIG_DEBUG_FS cleanup 2012-04-18 13:53:12 +02:00