linux-stable/arch/s390/mm
Janosch Frank 2188cf062e s390/mm: Check for valid vma before zapping in gmap_discard
commit 1843abd032 upstream.

Userspace could have munmapped the area before doing unmapping from
the gmap. This would leave us with a valid vmaddr, but an invalid vma
from which we would try to zap memory.

Let's check before using the vma.

Fixes: 1e133ab296 ("s390/mm: split arch/s390/mm/pgtable.c")
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <20180816082432.78828-1-frankja@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-01 09:44:25 +01:00
..
cmm.c
dump_pagetables.c s390/pgtable: get rid of _REGION3_ENTRY_RO 2016-06-13 15:58:14 +02:00
extmem.c s390/extmem: fix gcc 8 stringop-overflow warning 2018-10-03 17:01:45 -07:00
fault.c s390/kvm: fix deadlock when killed by oom 2018-09-05 09:20:06 +02:00
gmap.c s390/mm: Check for valid vma before zapping in gmap_discard 2018-12-01 09:44:25 +01:00
gup.c s390/mm: fix write access check in gup_huge_pmd() 2017-10-05 09:44:01 +02:00
hugetlbpage.c s390/mm: use hugetlb_bad_size() 2016-10-17 11:25:26 +02:00
init.c s390/mm: fix zone calculation in arch_add_memory() 2016-10-24 10:26:17 +02:00
maccess.c s390/maccess: reduce stnsm instructions 2016-02-17 09:05:04 +01:00
Makefile s390/extable: use generic search and sort routines 2016-03-22 15:36:02 -07:00
mem_detect.c s390/mem_detect: use unsigned longs 2016-01-11 12:27:11 +01:00
mmap.c mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
page-states.c s390/mm: use basic block for essa inline assembly 2016-06-28 09:32:29 +02:00
pageattr.c s390/mm: merge local / non-local IPTE helper 2016-08-24 09:23:55 +02:00
pgalloc.c s390/mm: correct allocate_pgste proc_handler callback 2018-10-03 17:01:42 -07:00
pgtable.c KVM: s390: Fix guest migration for huge guests resulting in panic 2017-03-18 19:14:34 +08:00
vmem.c s390: add proper __ro_after_init support 2016-06-13 15:58:23 +02:00