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

[xen staging] x86/IRQ: constrain creator-domain-ID assertion



commit d7127e06f617ed89eefe17a9ac954032863032d5
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed May 14 11:00:00 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed May 14 11:00:00 2025 +0200

    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 <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 38ac0823d7..556134f85a 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -289,9 +289,9 @@ int create_irq(nodeid_t node, bool grant_access)
                 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)
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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