Commit d2d84cea authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] Fix random crashes in x86-64 swsusp

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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3c0d73d2
...@@ -88,7 +88,8 @@ static int __init init_syscall32(void) ...@@ -88,7 +88,8 @@ static int __init init_syscall32(void)
__initcall(init_syscall32); __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) if (use_sysenter < 0)
use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL); use_sysenter = (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL);
......
...@@ -195,7 +195,8 @@ void pda_init(int cpu) ...@@ -195,7 +195,8 @@ void pda_init(int cpu)
char boot_exception_stacks[N_EXCEPTION_STACKS * EXCEPTION_STKSZ] char boot_exception_stacks[N_EXCEPTION_STACKS * EXCEPTION_STKSZ]
__attribute__((section(".bss.page_aligned"))); __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. * LSTAR and STAR live in a bit strange symbiosis.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment