From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Suspend to RAM generates oops and general protection fault
Date: Tue, 23 Jan 2007 15:38:24 +1100 [thread overview]
Message-ID: <45B59140.3050606@usherbrooke.ca> (raw)
In-Reply-To: <200701221259.06817.rjw@sisk.pl>
>> I just encountered the following oops and general protection fault
>> trying to suspend/resume my laptop. I've got a Dell D820 laptop with a 2
>> GHz Core 2 Duo CPU. It usually suspends/resumes fine but not always. The
>> relevant errors are below but the full dmesg log is at
>> http://people.xiph.org/~jm/suspend_resume_oops.txt and my config is in
>> http://people.xiph.org/~jm/config-2.6.20-rc5.txt
>>
>> This happens when I'm running 2.6.20-rc5. The previous kernel version I
>> was using is 2.6.19-rc6 and was much more broken (second attempt
>> *always* failed), so it's probably not a regression.
>
> This is a shot against the odds, but could you please check if the attached
> patch has any effect?
Thanks, I'll try that. It may take a while because the problem only
happened once in dozens of suspend/resume cycles.
Jean-Marc
> Rafael
>
>
>
>
> ------------------------------------------------------------------------
>
> Both process_zones()and drain_node_pages() check for populated zones before
> touching pagesets. However, __drain_pages does not do so,
>
> This may result in a NULL pointer dereference for pagesets in unpopulated
> zones if a NUMA setup is combined with cpu hotplug.
>
> Initially the unpopulated zone has the pcp pointers pointing to the boot
> pagesets. Since the zone is not populated the boot pageset pointers will
> not be changed during page allocator and slab bootstrap.
>
> If a cpu is later brought down (first call to __drain_pages()) then the pcp
> pointers for cpus in unpopulated zones are set to NULL since __drain_pages
> does not first check for an unpopulated zone.
>
> If the cpu is then brought up again then we call process_zones() which will ignore
> the unpopulated zone. So the pageset pointers will still be NULL.
>
> If the cpu is then again brought down then __drain_pages will attempt to drain
> pages by following the NULL pageset pointer for unpopulated zones.
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> ---
> mm/page_alloc.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> Index: linux-2.6.20-rc4/mm/page_alloc.c
> ===================================================================
> --- linux-2.6.20-rc4.orig/mm/page_alloc.c
> +++ linux-2.6.20-rc4/mm/page_alloc.c
> @@ -714,6 +714,9 @@ static void __drain_pages(unsigned int c
> if (!populated_zone(zone))
> continue;
>
> + if (!populated_zone(zone))
> + continue;
> +
> pset = zone_pcp(zone, cpu);
> for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
> struct per_cpu_pages *pcp;
prev parent reply other threads:[~2007-01-23 4:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-22 2:34 Suspend to RAM generates oops and general protection fault Jean-Marc Valin
2007-01-22 3:23 ` Nigel Cunningham
2007-01-22 5:16 ` Jean-Marc Valin
2007-01-22 5:19 ` Nigel Cunningham
2007-01-22 13:25 ` Pavel Machek
2007-01-23 4:42 ` Jean-Marc Valin
2007-01-23 7:11 ` Luming Yu
2007-01-23 14:53 ` Jean-Marc Valin
2007-01-23 15:05 ` Luming Yu
2007-03-23 12:34 ` Jean-Marc Valin
2007-01-22 11:59 ` Rafael J. Wysocki
2007-01-23 4:38 ` Jean-Marc Valin [this message]
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=45B59140.3050606@usherbrooke.ca \
--to=jean-marc.valin@usherbrooke.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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