linux/drivers/sh/intc
Thomas Gleixner 51b971b1b9 sh/intc: 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: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh@vger.kernel.org
2015-06-25 11:57:50 +02:00
..
access.c sh: Fix up more fallout from pointless ARM __iomem churn. 2012-10-15 14:08:48 +09:00
balancing.c sh: intc: remove dependency on NR_IRQS 2012-01-25 20:37:48 -06:00
chip.c sh: Fix up more fallout from pointless ARM __iomem churn. 2012-10-15 14:08:48 +09:00
core.c sh/intc: Fix race in installing chained IRQ handler 2015-06-25 11:57:50 +02:00
handle.c SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
internals.h sh: intc: initial irqdomain support. 2012-08-01 17:13:46 +09:00
irqdomain.c sh: intc: initial irqdomain support. 2012-08-01 17:13:46 +09:00
Kconfig sh: intc: Confine SH_INTC to platforms that need it 2014-08-22 12:28:16 +09:00
Makefile sh: intc: initial irqdomain support. 2012-08-01 17:13:46 +09:00
userimask.c sh: intc - convert sysdev_class to a regular subsystem 2011-12-21 15:09:52 -08:00
virq-debugfs.c
virq.c sh/intc: Fix potential race in installing chained IRQ handler 2015-06-25 11:57:19 +02:00