lkml.org 
[lkml]   [2004]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectBugfix for PPC64 hugepage support
Linus, please apply.

Due to a misunderstanding of pmd_offset() the PPC64 hugepage code could
end up looking at bogus pages as if they were PMD pages.

Index: working-2.6/arch/ppc64/mm/hugetlbpage.c
===================================================================
--- working-2.6.orig/arch/ppc64/mm/hugetlbpage.c 2004-03-09 10:50:44.000000000 +1100
+++ working-2.6/arch/ppc64/mm/hugetlbpage.c 2004-04-01 12:53:54.920618632 +1000
@@ -190,6 +190,9 @@
BUG_ON(!in_hugepage_area(mm->context, addr));

pgd = pgd_offset(mm, addr);
+ if (pgd_none(*pgd))
+ return NULL;
+
pmd = pmd_offset(pgd, addr);

/* We shouldn't find a (normal) PTE page pointer here */

--
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.050 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site