OpenCloudOS-Kernel/arch/mips/kvm
Deng-Cheng Zhu 8c9eb041cf MIPS: KVM: Fix memory leak on VCPU
kvm_arch_vcpu_free() is called in 2 code paths:

1) kvm_vm_ioctl()
       kvm_vm_ioctl_create_vcpu()
           kvm_arch_vcpu_destroy()
               kvm_arch_vcpu_free()
2) kvm_put_kvm()
       kvm_destroy_vm()
           kvm_arch_destroy_vm()
               kvm_mips_free_vcpus()
                   kvm_arch_vcpu_free()

Neither of the paths handles VCPU free. We need to do it in
kvm_arch_vcpu_free() corresponding to the memory allocation in
kvm_arch_vcpu_create().

Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Cc: stable@vger.kernel.org
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-06-25 14:17:03 +02:00
..
00README.txt KVM/MIPS32: Release notes and KVM module Makefile 2013-05-08 03:55:35 +02:00
Kconfig MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION 2013-07-19 12:45:57 +02:00
Makefile KVM/MIPS32: Release notes and KVM module Makefile 2013-05-08 03:55:35 +02:00
kvm_cb.c KVM/MIPS32: Routines to handle specific traps/exceptions while executing the guest. 2013-05-08 03:55:36 +02:00
kvm_locore.S MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst 2014-05-30 12:59:54 +02:00
kvm_mips.c MIPS: KVM: Fix memory leak on VCPU 2014-06-25 14:17:03 +02:00
kvm_mips_comm.h KVM/MIPS32: Binary patching of select privileged instructions. 2013-05-09 17:48:22 +02:00
kvm_mips_commpage.c KVM/MIPS32: Binary patching of select privileged instructions. 2013-05-09 17:48:22 +02:00
kvm_mips_dyntrans.c MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst 2014-05-30 12:59:54 +02:00
kvm_mips_emul.c MIPS: KVM: Remove ifdef DEBUG around kvm_debug 2014-05-30 13:05:28 +02:00
kvm_mips_int.c KVM/MIPS32: Guest interrupt delivery. 2013-05-08 03:55:36 +02:00
kvm_mips_int.h KVM/MIPS32: Guest interrupt delivery. 2013-05-08 03:55:36 +02:00
kvm_mips_opcode.h KVM/MIPS32: Privileged instruction/target branch emulation. 2013-05-08 03:55:35 +02:00
kvm_mips_stats.c KVM/MIPS32: COP0 accesses profiling. 2013-05-08 03:55:36 +02:00
kvm_tlb.c MIPS: KVM: Quieten kvm_info() logging 2014-05-30 13:05:37 +02:00
kvm_trap_emul.c MIPS: KVM: Remove ifdef DEBUG around kvm_debug 2014-05-30 13:05:28 +02:00
trace.h KVM/MIPS32: MIPS arch specific APIs for KVM 2013-05-08 03:55:35 +02:00