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

[xen master] domain: move vmtrace_alloc_buffer() invocation in vcpu_create()



commit adfbdaa347d05e53c8c61ad00a6851bd5b82c760
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Mar 10 09:23:25 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Mar 10 09:23:25 2026 +0100

    domain: move vmtrace_alloc_buffer() invocation in vcpu_create()
    
    The label used upon the function failing is wrong. Instead of correcting
    the label, move the invocation up a little, to also avoid it altogether
    for the idle domain (where ->vmtrace_size would be zero, and hence the
    function would bail right away anyway).
    
    Fixes: 217dd79ee292 ("xen/domain: Add vmtrace_size domain creation 
parameter")
    Reported-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/common/domain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index d24be268ae..ab910fcf93 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -500,14 +500,14 @@ struct vcpu *vcpu_create(struct domain *d, unsigned int 
vcpu_id)
         set_bit(_VPF_down, &v->pause_flags);
         vcpu_info_reset(v);
         init_waitqueue_vcpu(v);
+
+        if ( vmtrace_alloc_buffer(v) != 0 )
+            goto fail_wq;
     }
 
     if ( sched_init_vcpu(v) != 0 )
         goto fail_wq;
 
-    if ( vmtrace_alloc_buffer(v) != 0 )
-        goto fail_wq;
-
     if ( arch_vcpu_create(v) != 0 )
         goto fail_sched;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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