]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[S390] take mmap_sem when walking guest page table
authorCarsten Otte <cotte@de.ibm.com>
Mon, 10 Oct 2011 14:59:15 +0000 (16:59 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 10 Oct 2011 14:58:58 +0000 (16:58 +0200)
commitdadc21d24e9bb5bca565284fc58594971c666b07
treed494709dfb1fd6377d7026fb343bddf1a05e88a9
parentd417808c4a48aa500f7e16f1dd494c0f8ae3035e
[S390] take mmap_sem when walking guest page table

gmap_fault needs to walk the guest page table. However, parts of
that may change if some other thread does munmap. In that case
gmap_unmap_notifier will also unmap the corresponding parts from
the guest page table. We need to take mmap_sem in order to serialize
these operations.
do_exception now calls __gmap_fault with mmap_sem held which does
not get exported to modules. The exported function, which is called
from KVM, now takes mmap_sem.

Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/pgtable.h
arch/s390/mm/fault.c
arch/s390/mm/pgtable.c