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Ă© <[email protected]>
Signed-off-by: Jan Beulich <[email protected]>

--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -493,14 +493,14 @@ struct vcpu *vcpu_create(struct domain *
         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;
 

Reply via email to