From: "Andi Kleen" This avoids a race on AMD systems where other CPUs could speculatively follow an already freed page table. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton --- 25-akpm/include/asm-x86_64/pgalloc.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN include/asm-x86_64/pgalloc.h~x86_64-only-free-pmds-and-puds-after-other-cpus-have include/asm-x86_64/pgalloc.h --- 25/include/asm-x86_64/pgalloc.h~x86_64-only-free-pmds-and-puds-after-other-cpus-have Wed Mar 23 15:39:03 2005 +++ 25-akpm/include/asm-x86_64/pgalloc.h Wed Mar 23 15:39:03 2005 @@ -98,7 +98,8 @@ extern inline void pte_free(struct page } #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) -#define __pmd_free_tlb(tlb,x) pmd_free(x) -#define __pud_free_tlb(tlb,x) pud_free(x) + +#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) +#define __pud_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) #endif /* _X86_64_PGALLOC_H */ _