android_kernel_samsung_univ.../arch/s390
Claudio Imbrenda f4d76c934b s390/kvm: fix deadlock when killed by oom
commit 306d6c49ac9ded11114cb53b0925da52f2c2ada1 upstream.

When the oom killer kills a userspace process in the page fault handler
while in guest context, the fault handler fails to release the mm_sem
if the FAULT_FLAG_RETRY_NOWAIT option is set. This leads to a deadlock
when tearing down the mm when the process terminates. This bug can only
happen when pfault is enabled, so only KVM clients are affected.

The problem arises in the rare cases in which handle_mm_fault does not
release the mm_sem. This patch fixes the issue by manually releasing
the mm_sem when needed.

Fixes: 24eb3a824c ("KVM: s390: Add FAULT_FLAG_RETRY_NOWAIT for guest fault")
Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-05 09:18:37 +02:00
..
appldata s390: appldata: drop owner assignment from platform_drivers 2014-10-20 16:20:13 +02:00
boot s390/decompressor: fix initrd corruption caused by bss clear 2017-04-12 12:38:34 +02:00
configs s390/defconfig: set SCSI_DH=y 2015-10-01 10:48:36 +02:00
crypto s390/crypto: unlock on error in prng_tdes_read() 2017-01-12 11:22:49 +01:00
hypfs hypfs_kill_super(): deal with failed allocations 2018-04-24 09:32:11 +02:00
include perf: fix invalid bit in diagnostic entry 2018-08-06 16:24:37 +02:00
kernel s390: Correct register corruption in critical section cleanup 2018-07-11 16:03:48 +02:00
kvm KVM: s390: Enable all facility bits that are known good for passthrough 2018-05-16 10:06:46 +02:00
lib s390/lib: use expoline for indirect branches 2018-05-26 08:48:58 +02:00
mm s390/kvm: fix deadlock when killed by oom 2018-09-05 09:18:37 +02:00
net s390: use expoline thunks in the BPF JIT 2018-05-26 08:48:59 +02:00
numa s390/numa: write kernel message when emu_size has been increased 2015-10-14 14:31:59 +02:00
oprofile s390/oprofile: fix compile error 2015-07-01 09:34:39 +02:00
pci s390/pci: do not require AIS facility 2017-12-09 18:42:39 +01:00
defconfig s390: new default configuration 2015-06-25 09:39:25 +02:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig s390: add sysfs attributes for spectre 2018-04-29 07:50:04 +02:00
Kconfig.debug
Makefile s390: add automatic detection of the spectre defense 2018-04-29 07:50:04 +02:00