From: dmkhn@proton.me
To: Mykola Kvach <xakep.amatop@gmail.com>
Cc: xen-devel@lists.xenproject.org,
Mykola Kvach <mykola_kvach@epam.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH] xen/arm: irq: add missing spin_unlock() in init_local_irq_data() error path
Date: Sat, 09 Aug 2025 17:15:04 +0000 [thread overview]
Message-ID: <aJeCElyVkGY8Ri3i@kraken> (raw)
In-Reply-To: <bd707bd0fd88fc53974a1214313a9b9103162bcc.1754749899.git.mykola_kvach@epam.com>
On Sat, Aug 09, 2025 at 05:32:41PM +0300, 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.
>
> Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Nice catch!
Please consider:
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
>
>
next prev parent reply other threads:[~2025-08-09 17:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-08-11 7:53 ` Jan Beulich
2025-08-11 8:48 ` Mykola Kvach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aJeCElyVkGY8Ri3i@kraken \
--to=dmkhn@proton.me \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=mykola_kvach@epam.com \
--cc=sstabellini@kernel.org \
--cc=xakep.amatop@gmail.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.