[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: irq: add missing spin_unlock() in init_local_irq_data() error path



On Sat, Aug 09, 2025 at 05:32:41PM +0300, Mykola Kvach wrote:
> From: Mykola Kvach <mykola_kvach@xxxxxxxx>
> 
> 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@xxxxxxxx>

Nice catch!

Please consider:

Reviewed-by: Denis Mukhin <dmukhin@xxxxxxxx> 

> ---
>  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
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.