diff options
author | Sasha Levin <alexander.levin@verizon.com> | 2016-08-14 18:23:56 -0400 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-08-17 12:58:31 -0400 |
commit | 256679c2a67b4ec06c207bb8bfa9e9f64f482ed8 (patch) | |
tree | 8fdbf92017d5df9ffc582ab3196bb1ca1c6a50b8 | |
parent | 9b01eafbc9514e71056e0a1a4714606385a431a4 (diff) |
s390/mm: fix gmap tlb flush issues
[ Upstream commit f045402984404ddc11016358411e445192919047 ]
__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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r-- | arch/s390/mm/pgtable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index ebf82a99df45..9ac703cfdb21 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(gmap_alloc); static void gmap_flush_tlb(struct gmap *gmap) { if (MACHINE_HAS_IDTE) - __tlb_flush_asce(gmap->mm, gmap->asce); + __tlb_flush_idte(gmap->asce); else __tlb_flush_global(); } @@ -212,7 +212,7 @@ void gmap_free(struct gmap *gmap) /* Flush tlb. */ if (MACHINE_HAS_IDTE) - __tlb_flush_asce(gmap->mm, gmap->asce); + __tlb_flush_idte(gmap->asce); else __tlb_flush_global(); |