aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-07-07 04:44:10 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-07-13 04:58:01 -0400
commitf045402984404ddc11016358411e445192919047 (patch)
treee31c13d4d50f6e205061570f25ffa790dd29427d /arch/s390/mm
parentd08de8e2d86744f91d9d5d57c56ca2b6e33bf6ec (diff)
s390/mm: fix gmap tlb flush issues
__tlb_flush_asce() should never be used if multiple asce belong to a mm. As this function changes mm logic determining if local or global tlb flushes will be neded, we might end up flushing only the gmap asce on all CPUs and a follow up mm asce flushes will only flush on the local CPU, although that asce ran on multiple CPUs. The missing tlb flushes will provoke strange faults in user space and even low address protections in user space, crashing the kernel. Fixes: 1b948d6caec4 ("s390/mm,tlb: optimize TLB flushing for zEC12") Cc: stable@vger.kernel.org # 3.15+ Reported-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/gmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 69466f6055c2..063c721ec0dc 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -85,7 +85,7 @@ EXPORT_SYMBOL_GPL(gmap_alloc);
85static void gmap_flush_tlb(struct gmap *gmap) 85static void gmap_flush_tlb(struct gmap *gmap)
86{ 86{
87 if (MACHINE_HAS_IDTE) 87 if (MACHINE_HAS_IDTE)
88 __tlb_flush_asce(gmap->mm, gmap->asce); 88 __tlb_flush_idte(gmap->asce);
89 else 89 else
90 __tlb_flush_global(); 90 __tlb_flush_global();
91} 91}
@@ -124,7 +124,7 @@ void gmap_free(struct gmap *gmap)
124 124
125 /* Flush tlb. */ 125 /* Flush tlb. */
126 if (MACHINE_HAS_IDTE) 126 if (MACHINE_HAS_IDTE)
127 __tlb_flush_asce(gmap->mm, gmap->asce); 127 __tlb_flush_idte(gmap->asce);
128 else 128 else
129 __tlb_flush_global(); 129 __tlb_flush_global();
130 130