x86/IRQ: constrain creator-domain-ID assertion
PATCH 1/1 x86/IRQ: constrain creator-domain-ID assertion
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 <[email protected]>
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/irq.c +2 -2
@@ -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 ) {
Quoted 7 lines · Jan Beulich
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 <[email protected]>Signed-off-by Jan Beulich <[email protected]>
Hm, the logic in that function is convoluted to say the least.
Reviewed-by Roger Pau Monné <[email protected]>
Thanks, Roger.