* [PATCH] x86/IRQ: constrain creator-domain-ID assertion
@ 2025-05-14 7:22 Jan Beulich
2025-05-14 8:28 ` Roger Pau Monné
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2025-05-14 7:22 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Roger Pau Monné, Marek Marczykowski
If init_one_irq_desc() fails, ->arch.creator_domid won't be set to the
expected value, and hence the assertion may trigger. Limit it to just
the success case of that function call.
Fixes: 92d9101eab ("x86: allow stubdom access to irq created for msi")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -289,9 +289,9 @@ int create_irq(nodeid_t node, bool grant
mask = NULL;
}
ret = assign_irq_vector(irq, mask);
- }
- ASSERT(desc->arch.creator_domid == DOMID_INVALID);
+ ASSERT(desc->arch.creator_domid == DOMID_INVALID);
+ }
if (ret < 0)
{
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] x86/IRQ: constrain creator-domain-ID assertion
2025-05-14 7:22 [PATCH] x86/IRQ: constrain creator-domain-ID assertion Jan Beulich
@ 2025-05-14 8:28 ` Roger Pau Monné
0 siblings, 0 replies; 2+ messages in thread
From: Roger Pau Monné @ 2025-05-14 8:28 UTC (permalink / raw)
To: Jan Beulich
Cc: xen-devel@lists.xenproject.org, Andrew Cooper, Marek Marczykowski
On Wed, May 14, 2025 at 09:22:54AM +0200, Jan Beulich wrote:
> If init_one_irq_desc() fails, ->arch.creator_domid won't be set to the
> expected value, and hence the assertion may trigger. Limit it to just
> the success case of that function call.
>
> Fixes: 92d9101eab ("x86: allow stubdom access to irq created for msi")
> Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Hm, the logic in that function is convoluted to say the least.
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Thanks, Roger.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-14 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 7:22 [PATCH] x86/IRQ: constrain creator-domain-ID assertion Jan Beulich
2025-05-14 8:28 ` Roger Pau Monné
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.