On 7/29/25 04:32, Jan Beulich wrote:
> On 28.07.2025 22:09, Andrew Cooper wrote:
>> 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.
> 
> I agree, and that variant would apparently be as easily backportable.
> Stewart, are you up for going that route?

Yep, I'll give it a try

> 
> Jan
> 
>> 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
> 


Reply via email to