Commit aa506dc7 authored by Jan Beulich's avatar Jan Beulich Committed by Thomas Gleixner

i386: avoid temporarily inconsistent pte-s

One more of these issues (which were considered fixed a few releases
back): other than on x86-64, i386 allows set_fixmap() to replace
already present mappings. Consequently, on PAE, care must be taken to
not update the high half of a pte while the low half is still holding
the old value.

[ tglx: arch/x86 adaptation ]
Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>

 arch/x86/mm/pgtable_32.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
parent d72b1b4f
...@@ -97,8 +97,7 @@ static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags) ...@@ -97,8 +97,7 @@ static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
} }
pte = pte_offset_kernel(pmd, vaddr); pte = pte_offset_kernel(pmd, vaddr);
if (pgprot_val(flags)) if (pgprot_val(flags))
/* <pfn,flags> stored as-is, to permit clearing entries */ set_pte_present(&init_mm, vaddr, pte, pfn_pte(pfn, flags));
set_pte(pte, pfn_pte(pfn, flags));
else else
pte_clear(&init_mm, vaddr, pte); pte_clear(&init_mm, vaddr, pte);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment