android_kernel_samsung_sm8650/arch/s390
Christian Borntraeger 86bfb18bad KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler
[ Upstream commit 0bc380beb78aa352eadbc21d934dd9606fcee808 ]

We do check for target CPU == -1, but this might change at the time we
are going to use it. Hold the physical target CPU in a local variable to
avoid out-of-bound accesses to the cpu arrays.

Cc: Pierre Morel <pmorel@linux.ibm.com>
Fixes: 87e28a15c4 ("KVM: s390: diag9c (directed yield) forwarding")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:57 +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 s390/topology: honour nr_cpu_ids when adding CPUs 2023-06-09 10:34:13 +02:00
kvm KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler 2023-07-19 16:21:57 +02:00
lib s390/uaccess: add missing earlyclobber annotations to __clear_user() 2023-04-06 12:10:55 +02:00
mm mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +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: reintroduce expoline dependence to scripts 2023-04-06 12:10:55 +02:00