OpenCloudOS-Kernel/arch/m68k/mac
Thomas Gleixner 09c5cb942f m68k/psc: 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: Joshua Thompson <funaho@jurai.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
2015-06-25 11:57:54 +02:00
..
Makefile mac68k: replace mac68k SCC code with platform device 2010-02-27 18:31:09 +01:00
baboon.c m68k/mac: fix baboon irq disable and shutdown 2011-12-10 19:52:47 +01:00
config.c m68k/mac: Fix scsi_type for Mac LC and similar models 2015-01-11 11:38:46 +01:00
iop.c m68k: Remove superfluous inclusions of <asm/bootinfo.h> 2013-11-26 11:09:22 +01:00
mac_penguin.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
macboing.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
macints.c m68k/mac: oss irq fixes 2011-12-10 19:52:47 +01:00
misc.c m68k: Remove superfluous inclusions of <asm/bootinfo.h> 2013-11-26 11:09:22 +01:00
oss.c m68k/mac: Fix out-of-bounds array index in OSS IRQ source initialization 2015-03-30 10:14:34 +02:00
psc.c m68k/psc: Fix race in installing chained IRQ handler 2015-06-25 11:57:54 +02:00
via.c m68k: Remove superfluous inclusions of <asm/bootinfo.h> 2013-11-26 11:09:22 +01:00