]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix random crashes in x86-64 swsusp
authorPavel Machek <pavel@suse.cz>
Fri, 8 Oct 2004 00:33:14 +0000 (17:33 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 8 Oct 2004 00:33:14 +0000 (17:33 -0700)
fix_processor_context was calling functions marked __init on x86-64;
bad idea.

Thanks to Rafael for keeping notifying me about this bug.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/ia32/syscall32.c
arch/x86_64/kernel/setup64.c

index 8a44bcaf93bcbf2c6f316e3dae7ca7e88d70ae6d..f82aeae6f83192607713f312df24d97edeb153d7 100644 (file)
@@ -88,7 +88,8 @@ static int __init init_syscall32(void)
        
 __initcall(init_syscall32); 
 
-void __init syscall32_cpu_init(void)
+/* May not be __init: called during resume */
+void syscall32_cpu_init(void)
 {
        if (use_sysenter < 0)
                use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL);
index 6693fb0e45587362ddf89f0f548dc73d1ae59165..b83680afe01a95c542abf544ee0618b33296bcfc 100644 (file)
@@ -195,7 +195,8 @@ void pda_init(int cpu)
 char boot_exception_stacks[N_EXCEPTION_STACKS * EXCEPTION_STKSZ] 
 __attribute__((section(".bss.page_aligned")));
 
-void __init syscall_init(void)
+/* May not be marked __init: used by software suspend */
+void syscall_init(void)
 {
        /* 
         * LSTAR and STAR live in a bit strange symbiosis.