]> git.hungrycats.org Git - linux/commitdiff
i386: avoid temporarily inconsistent pte-s
authorJan Beulich <jbeulich@novell.com>
Wed, 17 Oct 2007 16:04:33 +0000 (18:04 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Nov 2007 17:42:31 +0000 (09:42 -0800)
patch aa506dc7b12d03fbf8fd11aab752aed1aadd9c07 in mainline.

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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/i386/mm/pgtable.c

index 01437c46baae9302e9770f4925d47cd14d8f0f78..91faa59e2a5f8474cb658acf397e11e3bb233a52 100644 (file)
@@ -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);