linux-stable/arch/s390
David Hildenbrand 41228f464f KVM: s390: vsie: Fix possible race when shadowing region 3 tables
[ Upstream commit 1493e0f944 ]

We have to properly retry again by returning -EINVAL immediately in case
somebody else instantiated the table concurrently. We missed to add the
goto in this function only. The code now matches the other, similar
shadowing functions.

We are overwriting an existing region 2 table entry. All allocated pages
are added to the crst_list to be freed later, so they are not lost
forever. However, when unshadowing the region 2 table, we wouldn't trigger
unshadowing of the original shadowed region 3 table that we replaced. It
would get unshadowed when the original region 3 table is modified. As it's
not connected to the page table hierarchy anymore, it's not going to get
used anymore. However, for a limited time, this page table will stick
around, so it's in some sense a temporary memory leak.

Identified by manual code inspection. I don't think this classifies as
stable material.

Fixes: 998f637cc4 ("s390/mm: avoid races on region/segment/page table shadowing")
Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20200403153050.20569-4-david@redhat.com
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-23 10:30:20 +02:00
..
appldata
boot s390: make 'install' not depend on vmlinux 2020-03-11 14:14:53 +01:00
configs
crypto s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding 2019-10-05 13:09:55 +02:00
hypfs hypfs: Fix error number left in struct pointer member 2019-10-07 18:57:15 +02:00
include s390/qdio: fill SL with absolute addresses 2020-03-11 14:14:54 +01:00
kernel s390/cpum_sf: Fix wrong page count in error message 2020-04-23 10:30:18 +02:00
kvm KVM: s390: vsie: Fix delivery of addressing exceptions 2020-04-17 10:48:48 +02:00
lib s390/kasan: avoid user access code instrumentation 2019-11-24 08:20:44 +01:00
mm KVM: s390: vsie: Fix possible race when shadowing region 3 tables 2020-04-23 10:30:20 +02:00
net s390/bpf: use 32-bit index for tail calls 2019-09-21 07:16:51 +02:00
numa s390/mm: Fix ERROR: "__node_distance" undefined! 2018-11-27 16:13:03 +01:00
oprofile
pci s390/pci: Fix possible deadlock in recover_store() 2020-02-24 08:34:38 +01:00
purgatory s390/purgatory: do not build purgatory with kcov, kasan and friends 2020-01-12 12:17:21 +01:00
scripts
tools Minor code cleanups for PPC. 2018-08-19 10:38:36 -07:00
defconfig crypto: speck - remove Speck 2018-11-13 11:08:46 -08:00
Kbuild
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-08-24 09:31:34 -07:00
Kconfig.debug
Makefile s390: make 'install' not depend on vmlinux 2020-03-11 14:14:53 +01:00