linux/arch/s390
Heiko Carstens a759972d25 KVM: s390: fix sthyi error handling
[ Upstream commit 0c02cc576e ]

Commit 9fb6c9b3fe ("s390/sthyi: add cache to store hypervisor info")
added cache handling for store hypervisor info. This also changed the
possible return code for sthyi_fill().

Instead of only returning a condition code like the sthyi instruction would
do, it can now also return a negative error value (-ENOMEM). handle_styhi()
was not changed accordingly. In case of an error, the negative error value
would incorrectly injected into the guest PSW.

Add proper error handling to prevent this, and update the comment which
describes the possible return values of sthyi_fill().

Fixes: 9fb6c9b3fe ("s390/sthyi: add cache to store hypervisor info")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Link: https://lore.kernel.org/r/20230727182939.2050744-1-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-08-11 12:08:11 +02:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390/ipl: add missing intersection check to ipl_report handling 2023-03-22 13:33:56 +01:00
configs s390/configs: add kasan.config addon config file 2022-11-08 19:32:32 +01:00
crypto s390/crypto: use vector instructions only if available for ChaCha20 2023-05-24 17:32:52 +01:00
hypfs s390/hypfs: avoid error message under KVM 2022-08-15 17:19:51 +02:00
include s390/ap: fix status returned by ap_qact() 2023-03-10 09:33:02 +01:00
kernel KVM: s390: fix sthyi error handling 2023-08-11 12:08:11 +02:00
kvm KVM: s390: fix sthyi error handling 2023-08-11 12:08:11 +02:00
lib s390/uaccess: add missing earlyclobber annotations to __clear_user() 2023-04-06 12:10:55 +02:00
mm KVM: s390: pv: fix index value of replaced ASCE 2023-08-03 10:23:48 +02:00
net s390/bpf: Add expoline to tail calls 2023-03-10 09:32:57 +01:00
pci PCI: s390: Fix use-after-free of PCI resources with per-function hotplug 2023-03-22 13:33:45 +01:00
purgatory s390/purgatory: disable branch profiling 2023-06-28 11:12:38 +02:00
tools KVM: s390: Add facility 197 to the allow list 2022-07-13 15:25:25 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390: always build relocatable kernel 2022-11-08 19:32:32 +01:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390/decompressor: fix misaligned symbol build error 2023-07-23 13:49:43 +02:00