diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-06-21 21:16:09 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-06-25 12:57:04 +0300 |
commit | 1e105921368b10b941bdbf252a156dc6171a6a6b (patch) | |
tree | 409042a3d119fbe83f5e360bdb239e5403c921dd /drivers/base/power/domain_governor.c | |
parent | 2cf5a03cb29debb00681a8af1dfa9179b43404d1 (diff) | |
download | linux-1e105921368b10b941bdbf252a156dc6171a6a6b.tar.xz |
pinctrl/mediatek: 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: Linus Walleij <linus.walleij@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Hongzhou Yang <hongzhou.yang@mediatek.com>
Cc: Axel Lin <axel.lin@ingics.com>
Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>
Cc: Maoguang Meng <maoguang.meng@mediatek.com>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Diffstat (limited to 'drivers/base/power/domain_governor.c')
0 files changed, 0 insertions, 0 deletions