projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e92935e
)
gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
author
Thomas Gleixner
<
[email protected]
>
Thu, 3 May 2012 10:22:06 +0000
(12:22 +0200)
committer
Grant Likely
<
[email protected]
>
Fri, 18 May 2012 22:48:36 +0000
(16:48 -0600)
commit
cfadd838
(powerpc/8xxx: Fix interrupt handling in MPC8xxx GPIO
driver) added an unconditional call of chip->irq_eoi() to the demux
handler.
This leads to a NULL pointer derefernce on MPC512x platforms which use
this driver as well.
Make it conditional.
Reported-by: Thomas Wucher <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
Cc: Felix Radensky <
[email protected]
>
Cc: Kumar Gala <
[email protected]
>
Cc: Grant Likely <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Grant Likely <
[email protected]
>
drivers/gpio/gpio-mpc8xxx.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-mpc8xxx.c
b/drivers/gpio/gpio-mpc8xxx.c
index e6568c19c939e1691a2a878e26292f1c877cae9b..5a1817eedd1ba42a661bde558d212d748b9752a3 100644
(file)
--- a/
drivers/gpio/gpio-mpc8xxx.c
+++ b/
drivers/gpio/gpio-mpc8xxx.c
@@
-163,7
+163,8
@@
static void mpc8xxx_gpio_irq_cascade(unsigned int irq, struct irq_desc *desc)
if (mask)
generic_handle_irq(irq_linear_revmap(mpc8xxx_gc->irq,
32 - ffs(mask)));
- chip->irq_eoi(&desc->irq_data);
+ if (chip->irq_eoi)
+ chip->irq_eoi(&desc->irq_data);
}
static void mpc8xxx_irq_unmask(struct irq_data *d)