diff options
author | 2018-07-26 15:38:41 +1000 | |
---|---|---|
committer | 2018-07-26 15:38:41 +1000 | |
commit | b5c6f7607b908b1445f2556c8d2f3b1ec5fc5aa8 (patch) | |
tree | 8f2b60ec1b6dc6462210929f2ede6f3a25f9de63 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | KVM: PPC: Book3S HV: Allow creating max number of VCPUs on POWER9 (diff) | |
download | linux-dev-b5c6f7607b908b1445f2556c8d2f3b1ec5fc5aa8.tar.xz linux-dev-b5c6f7607b908b1445f2556c8d2f3b1ec5fc5aa8.zip |
KVM: PPC: Book3S HV: Read kvm->arch.emul_smt_mode under kvm->lock
Commit 1e175d2 ("KVM: PPC: Book3S HV: Pack VCORE IDs to access full
VCPU ID space", 2018-07-25) added code that uses kvm->arch.emul_smt_mode
before any VCPUs are created. However, userspace can change
kvm->arch.emul_smt_mode at any time up until the first VCPU is created.
Hence it is (theoretically) possible for the check in
kvmppc_core_vcpu_create_hv() to race with another userspace thread
changing kvm->arch.emul_smt_mode.
This fixes it by moving the test that uses kvm->arch.emul_smt_mode into
the block where kvm->lock is held.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions