acrn-kernel/arch/s390/kvm
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
..
Kconfig
Makefile
diag.c KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler 2023-07-19 16:21:57 +02:00
gaccess.c
gaccess.h
guestdbg.c
intercept.c
interrupt.c
irq.h
kvm-s390.c KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes 2023-07-19 16:21:55 +02:00
kvm-s390.h
pci.c
pci.h
priv.c
pv.c
sigp.c
trace-s390.h
trace.h
vsie.c KVM: s390: vsie: fix the length of APCB bitmap 2023-07-19 16:21:57 +02:00