linux/arch/mips
Deng-Cheng Zhu c42ce86f16 MIPS: KVM: Fix memory leak on VCPU
commit 8c9eb041cf upstream.

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>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-06 18:57:29 -07:00
..
alchemy MIPS: Alchemy: Fix unchecked kstrtoul return value 2014-03-06 20:52:28 +01:00
ar7 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
ath79 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
bcm47xx MIPS: BCM47XX: Check all (32) GPIOs when looking for a pin 2014-03-19 09:28:10 +01:00
bcm63xx mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
boot mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
cavium-octeon genirq: Allow forcing cpu affinity of interrupts 2014-06-07 10:28:08 -07:00
cobalt MIPS: Cobalt: Move to 8250/16550 serial early printk driver 2013-10-29 21:24:38 +01:00
configs MIPS: Kill CONFIG_MTD_PARTITIONS 2014-01-24 22:39:45 +01:00
dec DEC: Whitespace cleanup 2013-10-29 21:24:44 +01:00
emma MIPS: Remove panic_timeout settings 2013-11-26 12:12:27 +01:00
fw mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
include MIPS: asm: thread_info: Add _TIF_SECCOMP flag 2014-06-16 13:40:32 -07:00
jazz Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-03-02 07:44:16 -08:00
jz4740 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
kernel MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region 2014-07-06 18:57:26 -07:00
kvm MIPS: KVM: Fix memory leak on VCPU 2014-07-06 18:57:29 -07:00
lantiq mips: dts: Fix missing device_type="memory" property in memory nodes 2014-06-07 10:28:07 -07:00
lasat mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
lib mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
loongson MIPS/loongson2_cpufreq: Fix CPU clock rate setting 2014-06-07 10:28:07 -07:00
loongson1 MIPS: Idle: Consolidate all declarations in <asm/idle.h>. 2013-05-22 01:34:27 +02:00
math-emu MIPS: math-emu: Fix prefx detection and COP1X function field definition 2014-03-11 23:10:55 +01:00
mm hugetlb: restrict hugepage_migration_support() to x86_64 2014-06-30 20:11:53 -07:00
mti-malta MIPS: APRP: Choose the correct VPE loader by fixing the linking 2014-03-06 21:20:23 +01:00
mti-sead3 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
netlogic Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
oprofile MIPS: Add support for interAptiv cores 2014-01-22 20:19:01 +01:00
pci MIPS: Octeon: Fix fall through on bar type OCTEON_DMA_BAR_TYPE_SMALL 2014-03-15 00:46:23 +01:00
pmcs-msp71xx MIPS: introduce MIPS_L1_CACHE_SHIFT_<N> 2014-01-24 22:39:55 +01:00
pnx833x MIPS: PNX833x: PNX8335_PCI_ETHERNET_INT depends on CONFIG_SOC_PNX8335 2013-08-05 13:34:22 +02:00
power MIPS: Hibernate: Flush TLB entries in swsusp_arch_resume() 2014-05-13 13:32:48 +02:00
ralink mips: dts: Fix missing device_type="memory" property in memory nodes 2014-06-07 10:28:07 -07:00
rb532 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sgi-ip22 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sgi-ip27 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
sgi-ip32 MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
sibyte MIPS: Remove panic_timeout settings 2013-11-26 12:12:27 +01:00
sni MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
txx9 MIPS: TXx9: Fix build error if CONFIG_TOSHIBA_JMR3927 is not selected 2013-09-03 15:30:50 +02:00
vr41xx MIPS: Idle: Consolidate all declarations in <asm/idle.h>. 2013-05-22 01:34:27 +02:00
Kbuild KVM/MIPS32: Infrastructure/build files. 2013-05-08 03:55:34 +02:00
Kbuild.platforms MIPS: PowerTV: Remove support code. 2013-10-29 21:25:17 +01:00
Kconfig MIPS: Fix possible build error with transparent hugepages enabled 2014-03-18 08:18:11 +01:00
Kconfig.debug MIPS: Add 8250/16550 serial early printk driver 2013-10-29 21:24:36 +01:00
Makefile Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00