summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-05-29 09:20:55 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-29 09:20:55 -0700
commitb8b98570eb08e18c68c3f31fc6bf39ac825865d1 (patch)
treed55a3dcdb102bf0f774fe932c7676ed6de06f755
parente9f0f4bc24ff401edc030699cf76d51055a21fd9 (diff)
[PATCH] fix oops on resume from apm bios initiated suspend
From: Milton Miller <miltonm@bga.com> mm is NULL for kernel threads without their own context. active_mm is maintained the one we lazly switch from. Without this patch, apm bios initiated suspend events (eg panel close) cause an oops on resume in the LDT restore, killing kapmd, which causes further events to not be polled.
-rw-r--r--arch/i386/kernel/suspend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/i386/kernel/suspend.c b/arch/i386/kernel/suspend.c
index 97aed5dd6a27..424976ec345b 100644
--- a/arch/i386/kernel/suspend.c
+++ b/arch/i386/kernel/suspend.c
@@ -114,7 +114,7 @@ static void fix_processor_context(void)
cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;
load_TR_desc(); /* This does ltr */
- load_LDT(&current->mm->context); /* This does lldt */
+ load_LDT(&current->active_mm->context); /* This does lldt */
/*
* Now maybe reload the debug registers