Skip to content
Commit 0bc380be authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Janosch Frank
Browse files

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: 87e28a15 ("KVM: s390: diag9c (directed yield) forwarding")
Reported-by: default avatarMarc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: default avatarNico Boehr <nrb@linux.ibm.com>
Reviewed-by: default avatarPierre Morel <pmorel@linux.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: default avatarJanosch Frank <frankja@linux.ibm.com>
parent 246be7d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment