Haoxiang Li <[email protected]> writes:

> When nestedv2 is enabled, kvmppc_core_vcpu_create_hv() allocates guest
> state buffers and messages through kvmhv_nestedv2_vcpu_create(). If
> the subsequent vcore lookup or allocation fails, it returns without
> releasing those resources.
>
> The caller's error path only calls kvmppc_subarch_vcpu_uninit(), which
> does not free the nestedv2 state. Call kvmhv_nestedv2_vcpu_free() before
> returning from the vcore error path when nestedv2 is enabled.
>
> Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests")
> Signed-off-by: Haoxiang Li <[email protected]>
> ---
>  arch/powerpc/kvm/book3s_hv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

The fix for this is already posted here [1]

[1]: 
https://lore.kernel.org/linuxppc-dev/082c338c69773a73a48cd4e0d0885ee0f6ef5326.1793546707.git.ritesh.l...@gmail.com/


Reply via email to