Skip to content

LoongArch: KVM: Fix kvm_device leak in kvm_{pch_pic|ipi|eiointc}_destroy

Qiang Ma kvm lkml loongarch 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3LoongArch: KVM: Fix kvm_device leak in kvm_pch_pic_destroyarch/loongarch/kvm/intc/pch_pic.c+2 -00 replies
2/3LoongArch: KVM: Fix kvm_device leak in kvm_ipi_destroyarch/loongarch/kvm/intc/ipi.c+2 -00 replies
3/3LoongArch: KVM: Fix kvm_device leak in kvm_eiointc_destroyarch/loongarch/kvm/intc/eiointc.c+2 -00 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBibo Mao
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] LoongArch: KVM: Fix kvm_device leak in kvm_{pch_pic|ipi|eiointc}_destroy

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(+)
Signature · 1 line
2.20.1