linux-stable/arch
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
..
alpha
arc ARC: define __ALIGN_STR and __ALIGN symbols for ARC 2020-03-18 07:14:21 +01:00
arm ARM: dts: imx6: Use gpc for FEC interrupt controller to fix wake on LAN. 2020-04-23 10:30:13 +02:00
arm64 arm64: armv8_deprecated: Fix undef_hook mask for thumb setend 2020-04-17 10:48:50 +02:00
c6x
h8300
hexagon hexagon: work around compiler crash 2020-01-17 19:47:17 +01:00
ia64 mm/memory_hotplug: shrink zones when offlining memory 2020-01-29 16:43:27 +01:00
m68k m68k: Call timer_interrupt() with interrupts disabled 2020-01-27 14:51:23 +01:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips MIPS: OCTEON: irq: Fix potential NULL pointer dereference 2020-04-17 10:48:47 +02:00
nds32 nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
nios2 nios2: ksyms: Add missing symbol exports 2020-01-27 14:50:30 +01:00
openrisc openrisc: Fix broken paths to arch/or32 2019-12-05 09:20:40 +01:00
parisc parisc: Use proper printk format for resource_size_t 2020-02-05 14:43:45 +00:00
powerpc powerpc/maple: Fix declaration made after definition 2020-04-23 10:30:18 +02:00
riscv riscv: avoid the PIC offset of static percpu data in module beyond 2G limits 2020-03-25 08:06:07 +01:00
s390 KVM: s390: vsie: Fix possible race when shadowing region 3 tables 2020-04-23 10:30:20 +02:00
sh pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs 2020-02-24 08:34:44 +01:00
sparc sparc: Add .exit.data section. 2020-02-24 08:34:37 +01:00
um um: ubd: Prevent buffer overrun on command completion 2020-04-23 10:30:19 +02:00
unicore32
x86 x86/Hyper-V: Report crash data in die() when panic_on_oops is set 2020-04-23 10:30:17 +02:00
xtensa xtensa: fix TLB sanity checker 2019-12-21 10:57:25 +01:00
.gitignore
Kconfig jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00