diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-09-04 00:57:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 09:06:24 +0200 |
commit | 7ef939054139ef857cebbec07cbd12d7cf7beedd (patch) | |
tree | c6e1c0722336b6155b0f7cf985b2ea4eb9c5d9e1 /include/asm-um/pgalloc.h | |
parent | [PATCH] uml: fix advanced sysemu check (diff) | |
download | linux-7ef939054139ef857cebbec07cbd12d7cf7beedd.tar.xz linux-7ef939054139ef857cebbec07cbd12d7cf7beedd.zip |
[PATCH] uml: fix x86_64 page leak
We were leaking pmd pages when 3_LEVEL_PGTABLES was enabled. This fixes that.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-um/pgalloc.h')
-rw-r--r-- | include/asm-um/pgalloc.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h index 8fcb2fc0a892..ea49411236dc 100644 --- a/include/asm-um/pgalloc.h +++ b/include/asm-um/pgalloc.h @@ -42,11 +42,13 @@ static inline void pte_free(struct page *pte) #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) #ifdef CONFIG_3_LEVEL_PGTABLES -/* - * In the 3-level case we free the pmds as part of the pgd. - */ -#define pmd_free(x) do { } while (0) -#define __pmd_free_tlb(tlb,x) do { } while (0) + +extern __inline__ void pmd_free(pmd_t *pmd) +{ + free_page((unsigned long)pmd); +} + +#define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) #endif #define check_pgt_cache() do { } while (0) |