linux-stable/virt/kvm
Miaohe Lin 34ef9cd887 KVM: fix memoryleak in kvm_init()
commit 5a2a961be2 upstream.

When alloc_cpumask_var_node() fails for a certain cpu, there might be some
allocated cpumasks for percpu cpu_kick_mask. We should free these cpumasks
or memoryleak will occur.

Fixes: baff59ccdc ("KVM: Pre-allocate cpumasks for kvm_make_all_cpus_request_except()")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/20220823063414.59778-1-linmiaohe@huawei.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-05 11:23:43 +02:00
..
async_pf.c mm/gup: remove task_struct pointer for all gup code 2020-08-12 10:58:04 -07:00
async_pf.h
coalesced_mmio.c KVM: Destroy target device if coalesced MMIO unregistration fails 2023-03-11 16:39:58 +01:00
coalesced_mmio.h
eventfd.c KVM: eventfd: Fix false positive RCU usage warning 2022-02-16 12:54:20 +01:00
irqchip.c
Kconfig entry: Provide infrastructure for work before transitioning to guest mode 2020-07-24 15:03:42 +02:00
kvm_main.c KVM: fix memoryleak in kvm_init() 2023-04-05 11:23:43 +02:00
vfio.c
vfio.h