Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ca45aaae1ef98890ac4e3ee48d65aa22401fd1dc
Commit:     ca45aaae1ef98890ac4e3ee48d65aa22401fd1dc
Parent:     b720a3be1abd0cb5b9b530c0a1b4044fec4de60e
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 1 19:21:03 2007 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Sun Mar 18 10:49:06 2007 +0200

    KVM: Unset kvm_arch_ops if arch module loading failed
    
    Otherwise, the core module thinks the arch module is loaded, and won't
    let you reload it after you've fixed the bug.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index a163bca..dc7a8c7 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2464,7 +2464,7 @@ int kvm_init_arch(struct kvm_arch_ops *ops, struct module 
*module)
 
        r = kvm_arch_ops->hardware_setup();
        if (r < 0)
-           return r;
+               goto out;
 
        on_each_cpu(kvm_arch_ops->hardware_enable, NULL, 0, 1);
        r = register_cpu_notifier(&kvm_cpu_notifier);
@@ -2500,6 +2500,8 @@ out_free_2:
 out_free_1:
        on_each_cpu(kvm_arch_ops->hardware_disable, NULL, 0, 1);
        kvm_arch_ops->hardware_unsetup();
+out:
+       kvm_arch_ops = NULL;
        return r;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to