[PATCH 1/3][SRU Bionic] UBUNTU: SAUCE: irqchip/gic-v3-its: Add missing return value in its_irq_domain_activate()

dann frazier dann.frazier at canonical.com
Wed Dec 11 21:45:48 UTC 2019


From: Sultan Alsawaf <sultan.alsawaf at canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1853485

The missing return value in its_irq_domain_activate() would cause IRQs
to be erratically disabled/enabled in unexpected ways on certain Cavium
boards. This caused all sorts of mayhem since the state of IRQs on each
CPU would be unpredictable; maybe they'd be enabled, maybe not.

This bug was introduced by a mismerge of commit d2fd562c0c69
("irqchip/gic-v3-its: Don't bind LPI to unavailable NUMA node") over a
year ago, in Ubuntu-4.15.0-44.47. The missing return value here is
-EINVAL; add it in to fix the wild breakage.

Signed-off-by: Sultan Alsawaf <sultan.alsawaf at canonical.com>
Signed-off-by: dann frazier <dann.frazier at canonical.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index a9f08d50adc28..5cc27ad2abd19 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2407,7 +2407,7 @@ static int its_irq_domain_activate(struct irq_domain *domain,
 	cpu = cpumask_first_and(cpu_mask, cpu_online_mask);
 	if (cpu >= nr_cpu_ids) {
 		if (its_dev->its->flags & ITS_FLAGS_WORKAROUND_CAVIUM_23144)
-			return;
+			return -EINVAL;
 
 		cpu = cpumask_first(cpu_online_mask);
 	}
-- 
2.24.0




More information about the kernel-team mailing list