All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/arm: irq: add missing spin_unlock() in init_local_irq_data() error path
@ 2025-08-09 14:32 Mykola Kvach
  2025-08-09 17:15 ` dmkhn
  2025-08-11  7:53 ` Jan Beulich
  0 siblings, 2 replies; 4+ messages in thread
From: Mykola Kvach @ 2025-08-09 14:32 UTC (permalink / raw)
  To: xen-devel
  Cc: Mykola Kvach, Stefano Stabellini, Julien Grall, Bertrand Marquis,
	Michal Orzel, Volodymyr Babchuk

From: Mykola Kvach <mykola_kvach@epam.com>

If init_one_irq_desc() fails, init_local_irq_data() returns without
releasing local_irqs_type_lock, leading to a possible deadlock.

Release the lock before returning to ensure proper cleanup.

Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
---
 xen/arch/arm/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index 4bbf0b0664..02ca82c089 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -94,7 +94,10 @@ static int init_local_irq_data(unsigned int cpu)
         int rc = init_one_irq_desc(desc);
 
         if ( rc )
+        {
+            spin_unlock(&local_irqs_type_lock);
             return rc;
+        }
 
         desc->irq = irq;
         desc->action  = NULL;
-- 
2.48.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-11  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-09 14:32 [PATCH] xen/arm: irq: add missing spin_unlock() in init_local_irq_data() error path Mykola Kvach
2025-08-09 17:15 ` dmkhn
2025-08-11  7:53 ` Jan Beulich
2025-08-11  8:48   ` Mykola Kvach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.