* [PATCH] irqdomain: Preserve reused IRQ descriptors on allocation failure
@ 2026-10-31 19:56 Avi Weiss
0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-10-31 19:56 UTC (permalink / raw)
To: tglx; +Cc: radu, linux-kernel, Avi Weiss
When __irq_domain_alloc_irqs() reuses an existing IRQ descriptor,
irq_domain_alloc_irqs_locked() frees that descriptor if IRQ data or
hierarchy allocation fails. This removes an IRQ descriptor which was
allocated before the call.
Only free descriptors allocated by irq_domain_alloc_irqs_locked().
Leave reused descriptors intact on failure.
Fixes: f8264e34965a ("irqdomain: Introduce new interfaces to support hierarchy irqdomains")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
kernel/irq/irqdomain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 4fdcb6df5306..494a7982f1ab 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1672,7 +1672,8 @@ static int irq_domain_alloc_irqs_locked(struct irq_domain *domain, int irq_base,
out_free_irq_data:
irq_domain_free_irq_data(virq, nr_irqs);
out_free_desc:
- irq_free_descs(virq, nr_irqs);
+ if (!realloc || irq_base < 0)
+ irq_free_descs(virq, nr_irqs);
return ret;
}
base-commit: 36aad21d50d1af3f6954bb0c988257a908202477
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-31 19:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 19:56 [PATCH] irqdomain: Preserve reused IRQ descriptors on allocation failure Avi Weiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®