linux/arch/mips/ralink
Thomas Gleixner 5c1642e4d2 MIPS/ralink: 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: Ralf Baechle <ralf@linux-mips.org>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
2015-06-25 11:58:01 +02:00
..
bootrom.c MIPS: ralink: add a bootrom dumper module 2014-11-24 07:45:22 +01:00
cevt-rt3352.c treewide: Fix typos in printk 2013-12-19 15:10:49 +01:00
clk.c MIPS: ralink: add missing clk_set_rate() to clk.c 2014-11-24 07:45:20 +01:00
common.h MIPS: ralink: cleanup the soc specific pinmux data 2014-11-24 07:45:24 +01:00
early_printk.c MIPS: ralink: cleanup early_printk 2014-11-24 07:45:24 +01:00
ill_acc.c MIPS: ralink: Fix clearing the illegal access interrupt 2015-06-01 10:51:37 +02:00
irq.c MIPS/ralink: Fix race in installing chained IRQ handler 2015-06-25 11:58:01 +02:00
Kconfig MIPS: ralink: add missing symbol for RALINK_ILL_ACC 2015-04-10 15:41:51 +02:00
Makefile MIPS: ralink: add a bootrom dumper module 2014-11-24 07:45:22 +01:00
mt7620.c MIPS: ralink: add mt7628an support 2014-11-24 07:45:24 +01:00
of.c MIPS: ralink: copy the commandline from the devicetree 2014-11-24 07:45:23 +01:00
Platform MIPS: ralink: mt7620: Add cpu-feature-override header 2013-09-04 16:58:31 +02:00
prom.c MIPS: ralink: cleanup the soc specific pinmux data 2014-11-24 07:45:24 +01:00
reset.c MIPS: ralink: Add support for reset-controller API 2013-09-04 18:27:28 +02:00
rt288x.c MIPS: ralink: cleanup the soc specific pinmux data 2014-11-24 07:45:24 +01:00
rt305x.c MIPS: ralink: cleanup the soc specific pinmux data 2014-11-24 07:45:24 +01:00
rt3883.c MIPS: ralink: cleanup the soc specific pinmux data 2014-11-24 07:45:24 +01:00
timer.c mips: ralink: drop owner assignment from platform_drivers 2014-10-20 16:20:09 +02:00