mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] LoongArch: KVM: Fix kvm_device leak in kvm_{pch_pic|ipi|eiointc}_destroy
@ 2025-12-26 15:07 Qiang Ma
  2025-12-26 15:07 ` [PATCH 1/3] LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroy Qiang Ma
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Qiang Ma @ 2025-12-26 15:07 UTC (permalink / raw)
  To: zhaotianrui, maobibo, chenhuacai, kernel
  Cc: kvm, loongarch, linux-kernel, Qiang Ma

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.

Qiang Ma (3):
  LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroy
  LoongArch: KVM: Fix kvm_device leak in kvm_ipi_destroy
  LoongArch: KVM: Fix kvm_device leak in kvm_eiointc_destroy

 arch/loongarch/kvm/intc/eiointc.c | 2 ++
 arch/loongarch/kvm/intc/ipi.c     | 2 ++
 arch/loongarch/kvm/intc/pch_pic.c | 2 ++
 3 files changed, 6 insertions(+)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-31  6:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-26 15:07 [PATCH 0/3] LoongArch: KVM: Fix kvm_device leak in kvm_{pch_pic|ipi|eiointc}_destroy Qiang Ma
2025-12-26 15:07 ` [PATCH 1/3] LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroy Qiang Ma
2025-12-26 15:07 ` [PATCH 2/3] LoongArch: KVM: Fix kvm_device leak in kvm_ipi_destroy Qiang Ma
2025-12-26 15:07 ` [PATCH 3/3] LoongArch: KVM: Fix kvm_device leak in kvm_eiointc_destroy Qiang Ma
2025-12-31  6:32 ` [PATCH 0/3] LoongArch: KVM: Fix kvm_device leak in kvm_{pch_pic|ipi|eiointc}_destroy Bibo Mao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®