[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] Fix ptep_get_and_clear(): atomic operation required on user ptes to
# HG changeset patch # User Keir Fraser <keir@xxxxxxxxxxxxx> # Date 1192782065 -3600 # Node ID 8302e7fad91e9620ef5160c4b54d22d7b97666c8 # Parent 7837d0ec57bce4578c17018ca1ef1ded64fe1dd3 Fix ptep_get_and_clear(): atomic operation required on user ptes to get correct snapshot of A/D bits. Error pointed out by Jan Beulich. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- include/asm-i386/mach-xen/asm/pgtable-2level.h | 2 +- include/asm-i386/mach-xen/asm/pgtable-3level.h | 2 +- include/asm-x86_64/mach-xen/asm/pgtable.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff -r 7837d0ec57bc -r 8302e7fad91e include/asm-i386/mach-xen/asm/pgtable-2level.h --- a/include/asm-i386/mach-xen/asm/pgtable-2level.h Thu Oct 18 16:18:48 2007 +0100 +++ b/include/asm-i386/mach-xen/asm/pgtable-2level.h Fri Oct 19 09:21:05 2007 +0100 @@ -44,7 +44,7 @@ static inline pte_t ptep_get_and_clear(s { pte_t pte = *ptep; if (!pte_none(pte)) { - if ((mm != current->mm && mm != &init_mm) || + if ((mm != &init_mm) || HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) pte = __pte_ma(xchg(&ptep->pte_low, 0)); } diff -r 7837d0ec57bc -r 8302e7fad91e include/asm-i386/mach-xen/asm/pgtable-3level.h --- a/include/asm-i386/mach-xen/asm/pgtable-3level.h Thu Oct 18 16:18:48 2007 +0100 +++ b/include/asm-i386/mach-xen/asm/pgtable-3level.h Fri Oct 19 09:21:05 2007 +0100 @@ -128,7 +128,7 @@ static inline pte_t ptep_get_and_clear(s { pte_t pte = *ptep; if (!pte_none(pte)) { - if ((mm != current->mm && mm != &init_mm) || + if ((mm != &init_mm) || HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) { uint64_t val = __pte_val(pte); if (__cmpxchg64(ptep, val, 0) != val) { diff -r 7837d0ec57bc -r 8302e7fad91e include/asm-x86_64/mach-xen/asm/pgtable.h --- a/include/asm-x86_64/mach-xen/asm/pgtable.h Thu Oct 18 16:18:48 2007 +0100 +++ b/include/asm-x86_64/mach-xen/asm/pgtable.h Fri Oct 19 09:21:05 2007 +0100 @@ -285,7 +285,7 @@ static inline pte_t ptep_get_and_clear(s { pte_t pte = *ptep; if (!pte_none(pte)) { - if ((mm != current->mm && mm != &init_mm) || + if ((mm != &init_mm) || HYPERVISOR_update_va_mapping(addr, __pte(0), 0)) pte = __pte_ma(xchg(&ptep->pte, 0)); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |