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

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
boot
configs
crypto s390/crypto: use vector instructions only if available for ChaCha20 2023-05-24 17:32:52 +01:00
hypfs
include
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
mm mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
net
pci
purgatory s390/purgatory: disable branch profiling 2023-06-28 11:12:38 +02:00
tools
Kbuild
Kconfig
Kconfig.debug
Makefile