On 28/07/2025 8:52 pm, Stewart Hildebrand wrote: > In vcpu_create after scheduler data is allocated, if > vmtrace_alloc_buffer fails, it will jump to the wrong cleanup label > resulting in a memory leak. Correct the label. > > Fixes: 217dd79ee292 ("xen/domain: Add vmtrace_size domain creation parameter") > Signed-off-by: Stewart Hildebrand <stewart.hildebr...@amd.com>
Urgh, sorry for breaking this. Ultimately it comes from having two different error handling schemes. This patch is probably ok to start with (and to backport), but a better fix would be to handle sched and wq in vcpu_teardown(). That way we get a single failure path that does the correct thing irrespective. An unrelated observation, but there's a waitqueue vcpu allocated in the common path, but I was under the impression that only x86 had any need for wqv (and I still need to get around to fixing introspection so we can drop wait.c entirely). ~Andrew