]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Fix bogus failure in kvm.ko module initialization
authorAvi Kivity <avi@qumranet.com>
Mon, 26 Feb 2007 14:29:43 +0000 (16:29 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 4 Mar 2007 09:12:43 +0000 (11:12 +0200)
A bogus 'return r' can cause an otherwise successful module load to fail.
This both denies users the use of kvm, and it also denies them the use of
their machine, as it leaves a filesystem registered with its callbacks
pointing into now-freed module memory.

Fix by returning a zero like a good module.

Thanks to Richard Lucassen <mailinglists@lucassen.org> (?) for reporting
the problem and for providing access to a machine which exhibited it.

Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c

index e48b4d7a350e26e3adba13ed53d0d5047bb11f38..ca82ba359e1aee0c2926f57cf5e82532e6587c6d 100644 (file)
@@ -2540,7 +2540,7 @@ static __init int kvm_init(void)
        bad_page_address = page_to_pfn(bad_page) << PAGE_SHIFT;
        memset(__va(bad_page_address), 0, PAGE_SIZE);
 
-       return r;
+       return 0;
 
 out:
        kvm_exit_debug();