Prev: [patch 134/149] x86, paravirt: Add a global synchronization point for pvclock
Next: [patch 021/149] V4L/DVB: gspca - stv06xx: Remove the 046d:08da from the stv06xx driver
From: Greg KH on 1 Jul 2010 14:30 2.6.32-stable review patch. If anyone has any objections, please let us know. ------------------ From: Wei Yongjun <yjwei(a)cn.fujitsu.com> This patch fixed possible memory leak in kvm_arch_vcpu_create() under s390, which would happen when kvm_arch_vcpu_create() fails. Signed-off-by: Wei Yongjun <yjwei(a)cn.fujitsu.com> Acked-by: Carsten Otte <cotte(a)de.ibm.com> Cc: stable(a)kernel.org Signed-off-by: Avi Kivity <avi(a)redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> (cherry picked from commit 7b06bf2ffa15e119c7439ed0b024d44f66d7b605) --- arch/s390/kvm/kvm-s390.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -338,11 +338,13 @@ struct kvm_vcpu *kvm_arch_vcpu_create(st rc = kvm_vcpu_init(vcpu, kvm, id); if (rc) - goto out_free_cpu; + goto out_free_sie_block; VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu, vcpu->arch.sie_block); return vcpu; +out_free_sie_block: + free_page((unsigned long)(vcpu->arch.sie_block)); out_free_cpu: kfree(vcpu); out_nomem: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |