Skip to content

Commit

Permalink
gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
Browse files Browse the repository at this point in the history
commit cfadd83(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]>
  • Loading branch information
KAGA-KOKO authored and glikely committed May 18, 2012
1 parent e92935e commit d6de85e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpio/gpio-mpc8xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6de85e

Please sign in to comment.