linux_dsm_epyc7002/arch/s390/mm
Janosch Frank 1843abd032 s390/mm: Check for valid vma before zapping in gmap_discard
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>
2018-09-12 14:46:37 +02:00
..
cmm.c s390/cmm: avoid add_timer on concurrently used timer 2018-07-16 15:45:41 +02:00
dump_pagetables.c s390: unify linker symbols usage 2018-02-27 08:05:23 +01:00
extmem.c s390/extmem: fix gcc 8 stringop-overflow warning 2018-07-02 11:24:50 +02:00
fault.c mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
gmap.c s390/mm: Check for valid vma before zapping in gmap_discard 2018-09-12 14:46:37 +02:00
gup.c mm/gup.c: document return value 2018-04-13 17:10:27 -07:00
hugetlbpage.c s390/mm: Clear skeys for newly mapped huge guest pmds 2018-07-30 11:20:18 +01:00
init.c mm: pass the vmem_altmap to arch_remove_memory and __remove_pages 2018-01-08 11:46:23 -08:00
maccess.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mem_detect.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmap.c exec: pass stack rlimit into mm layout functions 2018-04-11 10:28:37 -07:00
page-states.c s390/mm: fix addressing exception after suspend/resume 2018-08-09 08:05:48 +02:00
pageattr.c s390/mm: Clear huge page storage keys on enable_skey 2018-07-30 11:20:18 +01:00
pgalloc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-08-13 19:07:17 -07:00
pgtable.c s390/mm: Add huge page gmap linking support 2018-07-30 23:13:38 +02:00
vmem.c mm: pass the vmem_altmap to vmemmap_free 2018-01-08 11:46:23 -08:00