On Wed, Nov 29, 2023 at 04:00:28PM +0000, Alejandro Vallejo wrote:
> They allocate two different hypercall buffers, but leak the first
> allocation if the second one failed due to an early return that bypasses
> cleanup.
> 
> Remove the early exit and go through _post() instead. Invoking _post() is
> benign even if _pre() failed.
> 
> Fixes: 6b85e427098c ('x86/sysctl: Implement XEN_SYSCTL_get_cpu_policy')
> Fixes: 60529dfeca14 ('x86/domctl: Implement XEN_DOMCTL_get_cpu_policy')
> Fixes: 14ba07e6f816 ('x86/domctl: Implement XEN_DOMCTL_set_cpumsr_policy')
> Signed-off-by: Alejandro Vallejo <[email protected]>

Reviewed-by: Anthony PERARD <[email protected]>

Thanks,

-- 
Anthony PERARD

Reply via email to