diff options
author | Christian Borntraeger <borntraeger@linux.ibm.com> | 2023-05-15 10:42:34 +0200 |
---|---|---|
committer | Janosch Frank <frankja@linux.ibm.com> | 2023-06-16 11:08:09 +0200 |
commit | 0bc380beb78aa352eadbc21d934dd9606fcee808 (patch) | |
tree | 77feadb3b7dd8ca8d224623b2d19900441df2adc /drivers/s390/char/uvdevice.c | |
parent | 246be7d2720ea9a795b576067ecc5e5c7a1e7848 (diff) | |
download | linux-stable-0bc380beb78aa352eadbc21d934dd9606fcee808.tar.gz linux-stable-0bc380beb78aa352eadbc21d934dd9606fcee808.tar.bz2 linux-stable-0bc380beb78aa352eadbc21d934dd9606fcee808.zip |
KVM: s390/diag: fix racy access of physical cpu number in diag 9c handler
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: 87e28a15c42c ("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>
Diffstat (limited to 'drivers/s390/char/uvdevice.c')
0 files changed, 0 insertions, 0 deletions