]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
uml: update address space affected by pud_clear
authorJeff Dike <jdike@addtoit.com>
Thu, 15 Nov 2007 00:58:53 +0000 (16:58 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 15 Nov 2007 02:45:37 +0000 (18:45 -0800)
pud_clear wasn't setting the _PAGE_NEWPAGE bit, fooling tlb_flush into
thinking that this area of the address space was up-to-date and not unmapping
whatever was covered by the pud.

This manifested itself as ldconfig on x86_64 complaining about the first
library it looked at not being a valid ELF file.  A config file is mapped at
0x4000000, as the only thing mapped under its pud, and unmapped.  The
unmapping caused a pud_clear, which, due to this bug, didn't actually unmap
the config file data on the host.  The first library is then mapped at the
same location, but is not actually mapped on the host because accesses to it
cause no page faults.  As a result, ldconfig sees the old config file data.

[akpm@linux-foundation.org: coding-style cleanups]
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/asm-um/pgtable-3level.h

index aa82b88db805bafd93224590924a3883084e05ef..3ebafbaacb24196d82eb5521f4c17292c0a850e7 100644 (file)
@@ -71,7 +71,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
 
 static inline void pud_clear (pud_t *pud)
 {
-        set_pud(pud, __pud(0));
+       set_pud(pud, __pud(_PAGE_NEWPAGE));
 }
 
 #define pud_page(pud) phys_to_page(pud_val(pud) & PAGE_MASK)