]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: s390: Fix ordering when adding to SCA
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Mon, 3 Aug 2026 12:40:39 +0000 (14:40 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Mon, 3 Aug 2026 14:51:34 +0000 (16:51 +0200)
commit9187a9186d0ac7b260b07917aabc672a80d37c3c
treef28ea6d65db454f2244e3faa7f97f0b54d556a24
parent216c5289dd66d9cde6b42cbe68ee8dec5669678a
KVM: s390: Fix ordering when adding to SCA

When adding a new vCPU to the SCA area, the validity bit in the MCN was
set before the pointer to the state description, potentially allowing
for a race.

Fix by setting the pointer before setting the bit.

Fixes: 14542a0a54c5 ("KVM: S390: Remove sca_lock")
Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260803124040.126471-13-imbrenda@linux.ibm.com>
arch/s390/kvm/kvm-s390.c