From: Milton Miller 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. 25-akpm/arch/i386/kernel/suspend.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/i386/kernel/suspend.c~resume-oops-fix arch/i386/kernel/suspend.c --- 25/arch/i386/kernel/suspend.c~resume-oops-fix Wed May 28 14:23:05 2003 +++ 25-akpm/arch/i386/kernel/suspend.c Wed May 28 14:23:05 2003 @@ -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(¤t->mm->context); /* This does lldt */ + load_LDT(¤t->active_mm->context); /* This does lldt */ /* * Now maybe reload the debug registers _