From: Chris Wright Date: Wed, 8 Feb 2006 02:20:14 +0000 (-0800) Subject: Add hugepages fix from David Gibson, fwd from akpm X-Git-Tag: v2.6.15.5~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=befe001768f33efd531d8c15fa76d257d7adf571;p=thirdparty%2Fkernel%2Fstable-queue.git Add hugepages fix from David Gibson, fwd from akpm --- 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 index 00000000000..9f8f6dc1fea --- /dev/null +++ b/queue/hugepages-need-clear_user_highpage-not-clear_highpage.patch @@ -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 + +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 +Acked-by: William Lee Irwin III +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Chris Wright +--- + + 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; + } + diff --git a/queue/series b/queue/series index 970854b3b6f..ce457309830 100644 --- a/queue/series +++ b/queue/series @@ -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