From: David Gibson <david@gibson.dropbear.id.au>
To: Andrew Morton <akpm@digeo.com>
Cc: Anton Blanchard <anton@samba.org>,
linuxppc64-dev@lists.linuxppc.org, linux-kernel@vger.kernel.org
Subject: [PPC64] Bug fix for hugepages on ppc64
Date: Tue, 20 Jan 2004 17:21:11 +1100 [thread overview]
Message-ID: <20040120062111.GG6455@zax> (raw)
Andrew, please apply.
Currently the flag indicating whether or not hugepages are allowed
below 4GB is not correctly propagated across fork(), which can lead to
oopses. The patch below fixes this.
diff -urN ppc64-linux-2.5/include/asm-ppc64/mmu_context.h linux-gogogo/include/asm-ppc64/mmu_context.h
--- ppc64-linux-2.5/include/asm-ppc64/mmu_context.h 2003-12-18 09:29:18.000000000 +1100
+++ linux-gogogo/include/asm-ppc64/mmu_context.h 2004-01-19 15:36:43.518987021 +1100
@@ -81,6 +81,8 @@
{
long head;
unsigned long flags;
+ /* This does the right thing across a fork (I hope) */
+ unsigned long low_hpages = mm->context & CONTEXT_LOW_HPAGES;
spin_lock_irqsave(&mmu_context_queue.lock, flags);
@@ -91,6 +93,7 @@
head = mmu_context_queue.head;
mm->context = mmu_context_queue.elements[head];
+ mm->context |= low_hpages;
head = (head < LAST_USER_CONTEXT-1) ? head+1 : 0;
mmu_context_queue.head = head;
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
reply other threads:[~2004-01-20 6:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040120062111.GG6455@zax \
--to=david@gibson.dropbear.id.au \
--cc=akpm@digeo.com \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.org \
/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