Skip to content

Commit e3b7ab0

Browse files
jhovoldMarc Zyngier
authored andcommitted
irqdomain: Drop bogus fwspec-mapping error handling
In case a newly allocated IRQ ever ends up not having any associated struct irq_data it would not even be possible to dispose the mapping. Replace the bogus disposal with a WARN_ON(). This will also be used to fix a shared-interrupt mapping race, hence the CC-stable tag. Fixes: 1e2a7d7 ("irqdomain: Don't set type when mapping an IRQ") Cc: [email protected] # 4.8 Tested-by: Hsin-Yi Wang <[email protected]> Tested-by: Mark-PK Tsai <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3f883c3 commit e3b7ab0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

kernel/irq/irqdomain.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -847,13 +847,8 @@ unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec)
847847
}
848848

849849
irq_data = irq_get_irq_data(virq);
850-
if (!irq_data) {
851-
if (irq_domain_is_hierarchy(domain))
852-
irq_domain_free_irqs(virq, 1);
853-
else
854-
irq_dispose_mapping(virq);
850+
if (WARN_ON(!irq_data))
855851
return 0;
856-
}
857852

858853
/* Store trigger type */
859854
irqd_set_trigger_type(irq_data, type);

0 commit comments

Comments
 (0)