public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix oops on resume from apm bios initiated suspend
@ 2003-05-28  6:43 Milton Miller
  2003-05-28 11:14 ` Pavel Machek
  2003-05-29  8:44 ` Alex Riesen
  0 siblings, 2 replies; 10+ messages in thread
From: Milton Miller @ 2003-05-28  6:43 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel, Andrew Morton


Hi Pavel.

Didn't know if you caught this one, but it fixes it for me and others
who responded on the list.  

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.

milton

===== arch/i386/kernel/suspend.c 1.16 vs edited =====
--- 1.16/arch/i386/kernel/suspend.c	Sat May 17 16:09:37 2003
+++ edited/arch/i386/kernel/suspend.c	Sat May 24 05:00:02 2003
@@ -114,7 +114,7 @@
         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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-05-29  8:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-28  6:43 [PATCH] fix oops on resume from apm bios initiated suspend Milton Miller
2003-05-28 11:14 ` Pavel Machek
2003-05-28 13:15   ` mikpe
2003-05-28 14:18     ` Pavel Machek
2003-05-28 22:28     ` Andrew Morton
2003-05-28 23:05       ` Pavel Machek
2003-05-28 23:19         ` Nigel Cunningham
2003-05-28 23:36           ` Pavel Machek
2003-05-28 23:10       ` Manfred Spraul
2003-05-29  8:44 ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox