]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86: Fix 27-rc crash on vsmp due to paravirt during module load
authorRavikiran Thirumalai <kiran@scalex86.org>
Tue, 23 Sep 2008 18:03:50 +0000 (11:03 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Oct 2008 03:22:59 +0000 (20:22 -0700)
commit 05e12e1c4c09cd35ac9f4e6af1e42b0036375d72 upstream.

vsmp_patch has been marked with __init ever since pvops, however,
apply_paravirt can be called during module load causing calls to
freed memory location.

Since apply_paravirt can only be called during bootup and module load,
mark vsmp patch with "__init_or_module"

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/vsmp_64.c

index ba8c0b75ab0ae8c4fbbaba61c4afd6637cf4bd4a..a3c9869b9ea066583cf2a6f5803213e8387cecac 100644 (file)
@@ -58,7 +58,7 @@ static void vsmp_irq_enable(void)
        native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
 }
 
-static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
+static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
                                  unsigned long addr, unsigned len)
 {
        switch (type) {