linux/arch/loongarch/kvm
Qiang Ma fc53a66227 LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroy()
commit 1cf342a7c3 upstream.

In kvm_ioctl_create_device(), kvm_device has allocated memory,
kvm_device->destroy() seems to be supposed to free its kvm_device
struct, but kvm_pch_pic_destroy() is not currently doing this, that
would lead to a memory leak.

So, fix it.

Cc: stable@vger.kernel.org
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-23 11:21:32 +01:00
..
intc LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroy() 2026-01-23 11:21:32 +01:00
exit.c LoongArch: KVM: Add sign extension with kernel IOCSR read emulation 2025-09-23 23:37:08 +08:00
interrupt.c LoongArch: KVM: Simplify kvm_deliver_intr() 2025-07-21 09:26:32 +08:00
irqfd.c LoongArch: KVM: Add irqfd support 2024-11-13 16:18:27 +08:00
Kconfig entry: Rename "kvm" entry code assets to "virt" to genericize APIs 2025-09-30 22:50:18 +00:00
main.c LoongArch: KVM: Fix multiple typos of KVM code 2025-04-26 09:58:13 +08:00
Makefile Fix mis-uses of 'cc-option' for warning disablement 2025-04-23 10:08:29 -07:00
mmu.c LoongArch: KVM: Set page with write attribute if dirty track disabled 2025-11-10 08:37:07 +08:00
switch.S LoongArch: KVM: Remove PGD saving during VM context switch 2025-03-18 16:48:08 +08:00
timer.c LoongArch: KVM: Add delay until timer interrupt injected 2025-11-10 08:37:07 +08:00
tlb.c LoongArch: KVM: Delay secondary mmu tlb flush until guest entry 2024-07-09 16:25:50 +08:00
trace.h LoongArch: KVM: Move kvm_iocsr tracepoint out of generic code 2025-09-23 23:37:26 +08:00
vcpu.c LoongArch: KVM: Skip PMU checking on vCPU context switch 2025-11-10 08:37:07 +08:00
vm.c LoongArch: KVM: Add PTW feature detection on new hardware 2025-09-23 23:37:08 +08:00