]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add hugepages fix from David Gibson, fwd from akpm
authorChris Wright <chrisw@sous-sol.org>
Wed, 8 Feb 2006 02:20:14 +0000 (18:20 -0800)
committerChris Wright <chrisw@sous-sol.org>
Wed, 8 Feb 2006 02:20:14 +0000 (18:20 -0800)
queue/hugepages-need-clear_user_highpage-not-clear_highpage.patch [new file with mode: 0644]
queue/series

diff --git a/queue/hugepages-need-clear_user_highpage-not-clear_highpage.patch b/queue/hugepages-need-clear_user_highpage-not-clear_highpage.patch
new file mode 100644 (file)
index 0000000..9f8f6dc
--- /dev/null
@@ -0,0 +1,39 @@
+From stable-bounces@linux.kernel.org  Tue Feb  7 13:06:55 2006
+Date: Tue, 07 Feb 2006 12:58:25 -0800
+From: akpm@osdl.org
+To: torvalds@osdl.org
+Cc: dwg@au1.ibm.com, stable@kernel.org, wli@holomorphy.com,
+        david@gibson.dropbear.id.au
+Subject: [PATCH] Hugepages need clear_user_highpage() not clear_highpage()
+
+From: David Gibson <david@gibson.dropbear.id.au>
+
+When hugepages are newly allocated to a file in mm/hugetlb.c, we clear them
+with a call to clear_highpage() on each of the subpages.  We should be
+using clear_user_highpage(): on powerpc, at least, clear_highpage() doesn't
+correctly mark the page as icache dirty so if the page is executed shortly
+after it's possible to get strange results.
+
+Signed-off-by: David Gibson <dwg@au1.ibm.com>
+Acked-by: William Lee Irwin III <wli@holomorphy.com>
+Cc: <stable@kernel.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+ mm/hugetlb.c |    2 +-
+ 1 files changed, 1 insertion(+), 1 deletion(-)
+
+Index: linux-2.6.15.3/mm/hugetlb.c
+===================================================================
+--- linux-2.6.15.3.orig/mm/hugetlb.c
++++ linux-2.6.15.3/mm/hugetlb.c
+@@ -100,7 +100,7 @@ struct page *alloc_huge_page(void)
+       set_page_count(page, 1);
+       page[1].mapping = (void *)free_huge_page;
+       for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i)
+-              clear_highpage(&page[i]);
++              clear_user_highpage(&page[i], addr);
+       return page;
+ }
index 970854b3b6fb7e99199196e5a5e56c28a9ae767a..ce4573098300dbceee1602d2109d3f4960f78914 100644 (file)
@@ -19,3 +19,4 @@ x86_64-clear-more-state-when-ignoring-empty-node-in-srat-parsing.patch
 bridge-netfilter-races-on-device-removal.patch
 emu10k1-fix-the-confliction-of-front-control.patch
 x86_64-dont-record-local-apic-ids-when-they-are-disabled-in-madt.patch
+hugepages-need-clear_user_highpage-not-clear_highpage.patch