]> git.ipfire.org Git - thirdparty/linux.git/commit
LoongArch: KVM: Fix kvm_device leak in kvm_ipi_destroy()
authorQiang Ma <maqianga@uniontech.com>
Sat, 17 Jan 2026 02:57:02 +0000 (10:57 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 17 Jan 2026 02:57:02 +0000 (10:57 +0800)
commit0bf58cb7288a4d3de6d8ecbb3a65928a9362bf21
tree3720aa6c060cd913c231f7d628cd49a1b354942d
parent14ea5a3625881d79f75418c66e3a7d98db8518e1
LoongArch: KVM: Fix kvm_device leak in kvm_ipi_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_ipi_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>
arch/loongarch/kvm/intc/ipi.c