Skip to content

Commit

Permalink
i386: avoid temporarily inconsistent pte-s
Browse files Browse the repository at this point in the history
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: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

 arch/x86/mm/pgtable_32.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  • Loading branch information
Jan Beulich authored and Thomas Gleixner committed Oct 17, 2007
1 parent d72b1b4 commit aa506dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/mm/pgtable_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ static void set_pte_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags)
}
pte = pte_offset_kernel(pmd, vaddr);
if (pgprot_val(flags))
/* <pfn,flags> stored as-is, to permit clearing entries */
set_pte(pte, pfn_pte(pfn, flags));
set_pte_present(&init_mm, vaddr, pte, pfn_pte(pfn, flags));
else
pte_clear(&init_mm, vaddr, pte);

Expand Down

0 comments on commit aa506dc

Please sign in to comment.