Skip to contentSkip to conversation

arm/ipipe: irq-crossbar: Fix NULL pointer dereference

PATCH Applied Lennart Sorensen 2 participants 2 messages May 2, 2016 – May 23, 2016 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/ipipe: irq-crossbar: Fix NULL pointer dereference

arm/ipipe: irq-crossbar: Fix NULL pointer dereference

The TI irq-crossbar driver needs to declare the irq_hold and irq_release functions, otherwise IPIPE will dereference a NULL pointer.

Tested on AM5728.

drivers/irqchip/irq-crossbar.c +5 -0
index c12bb93..8bb1af7 100644
@@ -15,6 +15,7 @@
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/slab.h>
+#include <linux/ipipe.h>
 
 #include "irqchip.h"
 
@@ -74,6 +75,10 @@ static struct irq_chip crossbar_chip = {
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,
 #endif
+#ifdef CONFIG_IPIPE
+	.irq_hold		= irq_chip_hold_parent,
+	.irq_release		= irq_chip_release_parent,
+#endif
 };
 
 static int allocate_gic_irq(struct irq_domain *domain, unsigned virq,
Signature · 1 line
Len Sorensen
#1 lore raw
Quoted 7 lines · Lennart Sorensen

arm/ipipe: irq-crossbar: Fix NULL pointer dereference

The TI irq-crossbar driver needs to declare the irq_hold and irq_release functions, otherwise IPIPE will dereference a NULL pointer.

Tested on AM5728.

Merged, thanks.

Signature · 1 line
Philippe.