Commit b8b98570 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent e9f0f4bc
......@@ -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
......
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