summaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-03-08 14:23:38 +0300
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-06-20 10:54:27 +0300
commit998f637cc4b9ef3fa32b196294a3136ee05271a2 (patch)
tree4877cf772f2b98f258578bb048ba6ed52ee77c2b /arch/s390/include
parenta9d23e71d7716e394a772686bfd994f4e181b235 (diff)
downloadlinux-998f637cc4b9ef3fa32b196294a3136ee05271a2.tar.xz
s390/mm: avoid races on region/segment/page table shadowing
We have to unlock sg->guest_table_lock in order to call gmap_protect_rmap(). If we sleep just before that call, another VCPU might pick up that shadowed page table (while it is not protected yet) and use it. In order to avoid these races, we have to introduce a third state - "origin set but still invalid" for an entry. This way, we can avoid another thread already using the entry before the table is fully protected. As soon as everything is set up, we can clear the invalid bit - if we had no race with the unshadowing code. Suggested-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
0 files changed, 0 insertions, 0 deletions