]> git.hungrycats.org Git - linux/commit
KVM: Clean up error handling during VCPU creation
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 19 Mar 2013 11:36:46 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 17:16:37 +0000 (10:16 -0700)
commitd104388ff9bdb5ec76d5337cd94f9ed4bbf73fbc
tree47ad30d1ce265c83ce110118f2cf57d013b5d5b8
parent8c7028941242372574880e513207abdbe486c3e5
KVM: Clean up error handling during VCPU creation

commit d780592b99d7d8a5ff905f6bacca519d4a342c76 upstream.

So far kvm_arch_vcpu_setup is responsible for freeing the vcpu struct if
it fails. Move this confusing resonsibility back into the hands of
kvm_vm_ioctl_create_vcpu. Only kvm_arch_vcpu_setup of x86 is affected,
all other archs cannot fail.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c
virt/kvm/kvm_main.c