From: Pavel Machek <pavel@suse.cz>
To: Milton Miller <miltonm@bga.com>
Cc: Pavel Machek <pavel@suse.cz>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@digeo.com>
Subject: Re: [PATCH] fix oops on resume from apm bios initiated suspend
Date: Wed, 28 May 2003 13:14:01 +0200 [thread overview]
Message-ID: <20030528111401.GB342@elf.ucw.cz> (raw)
In-Reply-To: <200305280643.h4S6hRQF028038@sullivan.realtime.net>
Hi!
> 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.
Ouch, okay, this looks good. Andrew please apply.
[I guess this is trivial enough for trivial patch monkey if andrew
does not want to take it...]
Pavel
> ===== 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(¤t->mm->context); /* This does lldt */
> + load_LDT(¤t->active_mm->context); /* This does lldt */
>
> /*
> * Now maybe reload the debug registers
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
next prev parent reply other threads:[~2003-05-28 11:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 6:43 [PATCH] fix oops on resume from apm bios initiated suspend Milton Miller
2003-05-28 11:14 ` Pavel Machek [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030528111401.GB342@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miltonm@bga.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox