The patch titled Fix kunmap_atomic's use of kpte_clear_flush() has been added to the -mm tree. Its filename is fix-kunmap_atomics-use-of-kpte_clear_flush.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Fix kunmap_atomic's use of kpte_clear_flush() From: Jeremy Fitzhardinge <jeremy@xxxxxxxx> kunmap_atomic() will call kpte_clear_flush with vaddr/ptep arguments which don't correspond if the vaddr is just a normal lowmem address (ie, not in the KMAP area). This patch makes sure that the pte is only cleared if kmap area was actually used for the mapping. Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Cc: Zachary Amsden <zach@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/i386/mm/highmem.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff -puN arch/i386/mm/highmem.c~fix-kunmap_atomics-use-of-kpte_clear_flush arch/i386/mm/highmem.c --- a/arch/i386/mm/highmem.c~fix-kunmap_atomics-use-of-kpte_clear_flush +++ a/arch/i386/mm/highmem.c @@ -50,22 +50,20 @@ void kunmap_atomic(void *kvaddr, enum km unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); -#ifdef CONFIG_DEBUG_HIGHMEM - if (vaddr >= PAGE_OFFSET && vaddr < (unsigned long)high_memory) { - pagefault_enable(); - return; - } - - if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx)) - BUG(); -#endif /* * Force other mappings to Oops if they'll try to access this pte * without first remap it. Keeping stale mappings around is a bad idea * also, in case the page changes cacheability attributes or becomes * a protected page in a hypervisor. */ - kpte_clear_flush(kmap_pte-idx, vaddr); + if (vaddr == __fix_to_virt(FIX_KMAP_BEGIN+idx)) + kpte_clear_flush(kmap_pte-idx, vaddr); + else { +#ifdef CONFIG_DEBUG_HIGHMEM + BUG_ON(vaddr < PAGE_OFFSET); + BUG_ON(vaddr >= (unsigned long)high_memory); +#endif + } pagefault_enable(); } _ Patches currently in -mm which might be from jeremy@xxxxxxxx are prep-for-paravirt-be-careful-about-touching-bios.patch prep-for-paravirt-be-careful-about-touching-bios-warning-fix.patch paravirtualization-header-and-stubs-for-fix.patch paravirtualization-more-generic-paravirtualization-warning-fix.patch fix-kunmap_atomics-use-of-kpte_clear_flush.patch generic-bug-implementation.patch generic-bug-for-i386.patch generic-bug-for-x86-64.patch uml-add-generic-bug-support.patch use-generic-bug-for-ppc.patch bug-test-1.patch fix-generic-warn_on-message.patch time-uninline-jiffiesh-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html