Messages in this thread Patch in this message | | | From | "Yang, Fei" <> | Date | Wed, 30 Nov 2011 16:58:28 -0800 | Subject | [PATCH] IRQ: Validate irq_ack function pointer before calling it |
| |
handle_edge_irq doesn't validate function pointer irq_ack before calling it. We need to check the pointer for NULL or the drivers have to implement irq_ack even an empty one. I think the former is better in case driver doesn't really need irq_ack.
Signed-off-by: Fei Yang <fei.yang@intel.com> Acked-by: Alan Cox <alan@linux.intel.com> --- kernel/irq/chip.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index dc5114b..12f9550 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -448,7 +448,8 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) kstat_incr_irqs_this_cpu(irq, desc);
/* Start handling the irq */ - desc->irq_data.chip->irq_ack(&desc->irq_data); + if (desc->irq_data.chip->irq_ack) + desc->irq_data.chip->irq_ack(&desc->irq_data);
do { if (unlikely(!desc->action)) { -- 1.7.0.4
| |