kernel_optimize_test/arch/i386/mm
Adam Litke 7bf07f3d4b [PATCH] hugetlb: move stale pte check into huge_pte_alloc()
Initial Post (Wed, 17 Aug 2005)

This patch moves the
	if (! pte_none(*pte))
		hugetlb_clean_stale_pgtable(pte);
logic into huge_pte_alloc() so all of its callers can be immune to the bug
described by Kenneth Chen at http://lkml.org/lkml/2004/6/16/246

> It turns out there is a bug in hugetlb_prefault(): with 3 level page table,
> huge_pte_alloc() might return a pmd that points to a PTE page. It happens
> if the virtual address for hugetlb mmap is recycled from previously used
> normal page mmap. free_pgtables() might not scrub the pmd entry on
> munmap and hugetlb_prefault skips on any pmd presence regardless what type
> it is.

Unless I am missing something, it seems more correct to place the check inside
huge_pte_alloc() to prevent a the same bug wherever a huge pte is allocated.
It also allows checking for this condition when lazily faulting huge pages
later in the series.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: <linux-mm@kvack.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:05:46 -07:00
..
boot_ioremap.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
discontig.c [PATCH] Move the fix to align node_end_pfns to a proper location 2005-08-07 10:00:39 -07:00
extable.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fault.c [PATCH] arch/i386/mm/fault.c: fix sparse warnings 2005-06-25 16:24:59 -07:00
highmem.c [PATCH] kdump: Routines for copying dump pages 2005-06-25 16:24:53 -07:00
hugetlbpage.c [PATCH] hugetlb: move stale pte check into huge_pte_alloc() 2005-09-05 00:05:46 -07:00
init.c [PATCH] swsusp: kill config_pm_disk 2005-06-25 16:24:32 -07:00
ioremap.c [PATCH] iounmap debugging 2005-07-07 18:23:35 -07:00
Makefile [PATCH] sparsemem memory model for i386 2005-06-23 09:45:05 -07:00
mmap.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pageattr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pgtable.c [PATCH] printk: arch/i386/mm/pgtable.c 2005-06-25 16:25:08 -07:00