linux-stable/virt/kvm
Miaohe Lin 5588657f41 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-03-17 08:49:04 +01: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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
binary_stats.c KVM: stats: remove dead stores 2021-08-13 03:35:15 -04:00
coalesced_mmio.c KVM: Destroy target device if coalesced MMIO unregistration fails 2023-03-10 09:40:00 +01:00
coalesced_mmio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dirty_ring.c KVM: Drop unused kvm_dirty_gfn_invalid() 2021-09-06 08:23:46 -04:00
eventfd.c KVM: eventfd: Fix false positive RCU usage warning 2022-02-16 12:56:16 +01:00
irqchip.c KVM/arm updates for 5.3 2019-07-11 15:14:16 +02:00
Kconfig kvm: add PM-notifier 2021-06-17 13:09:32 -04:00
kvm_main.c KVM: fix memoryleak in kvm_init() 2023-03-17 08:49:04 +01:00
mmu_lock.h KVM: x86/mmu: Use an rwlock for the x86 MMU 2021-02-04 05:27:43 -05:00
vfio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vfio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00