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.
Fixes: 2bb32b809250 ("xen/irq: Propagate the error from init_one_desc_irq() in init_*_irq_data()")
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Reviewed-by: Denis Mukhin <dmukhin@ford.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
Hi Mykola,
On 11/08/2025 09:45, Mykola Kvach wrote:
> 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.
>
> Fixes: 2bb32b809250 ("xen/irq: Propagate the error from init_one_desc_irq() in init_*_irq_data()")
> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
> Reviewed-by: Denis Mukhin <dmukhin@ford.com>
Acked-by: Julien Grall <jgrall@amazon.com>
I will commit the patch soon.
Cheers,
--
Julien Grall
On 11/08/2025 18:28, Julien Grall wrote:
> Hi Mykola,
>
> On 11/08/2025 09:45, Mykola Kvach wrote:
>> 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.
>>
>> Fixes: 2bb32b809250 ("xen/irq: Propagate the error from
>> init_one_desc_irq() in init_*_irq_data()")
>> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
>> Reviewed-by: Denis Mukhin <dmukhin@ford.com>
>
> Acked-by: Julien Grall <jgrall@amazon.com>
>
> I will commit the patch soon.
This is now merged.
Cheers,
--
Julien Grall
On Tue, Aug 12, 2025 at 2:07 PM Julien Grall <julien@xen.org> wrote:
>
>
>
> On 11/08/2025 18:28, Julien Grall wrote:
> > Hi Mykola,
> >
> > On 11/08/2025 09:45, Mykola Kvach wrote:
> >> 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.
> >>
> >> Fixes: 2bb32b809250 ("xen/irq: Propagate the error from
> >> init_one_desc_irq() in init_*_irq_data()")
> >> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
> >> Reviewed-by: Denis Mukhin <dmukhin@ford.com>
> >
> > Acked-by: Julien Grall <jgrall@amazon.com>
> >
> > I will commit the patch soon.
>
> This is now merged.
Thanks everyone for the reviews and merging!
Best regards,
Mykola
>
> Cheers,
>
> --
> Julien Grall
>
© 2016 - 2025 Red Hat, Inc.