mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Andrew Morton <akpm@osdl.org>
Cc: apw@shadowen.org, wli@holomorphy.com, linux-kernel@vger.kernel.org
Subject: Hugepage bugfix
Date: Wed, 2 Jun 2004 12:23:12 +1000	[thread overview]
Message-ID: <20040602022312.GB2042@zax> (raw)

Andrew, please apply:

Currently the hugepage code stores the hugepage destructor in the
mapping field of the second of the compound pages.  However, this
field is never cleared again, which causes tracebacks from
free_pages_check() if the hugepage is later destroyed by reducing the
number in /proc/sys/vm/nr_hugepages.  This patch fixes the bug by
clearing the mapping field when the hugepage is freed.

Index: working-2.6/mm/hugetlb.c
===================================================================
--- working-2.6.orig/mm/hugetlb.c	2004-05-20 12:59:04.000000000 +1000
+++ working-2.6/mm/hugetlb.c	2004-06-02 12:14:53.582693952 +1000
@@ -57,6 +57,7 @@
 	BUG_ON(page_count(page));
 
 	INIT_LIST_HEAD(&page->lru);
+	page[1].mapping = NULL;
 
 	spin_lock(&hugetlb_lock);
 	enqueue_huge_page(page);



-- 
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-06-02  2:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02  2:23 David Gibson [this message]
2004-06-02  2:43 ` William Lee Irwin III

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=20040602022312.GB2042@zax \
    --to=david@gibson.dropbear.id.au \
    --cc=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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

all inboxes | Powered by JetHome®