Paul Mackerras
b5c6f7607b
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>
2018-07-26 15:38:41 +10:00
..
2016-03-03 21:19:21 +11:00
2018-05-18 15:38:23 +10:00
2011-09-25 19:52:29 +03:00
2017-05-08 12:37:56 -07:00
2018-06-14 17:42:54 +02:00
2018-06-07 10:23:33 -07:00
2018-06-01 10:29:22 +10:00
2017-11-01 15:17:25 +11:00
2018-05-18 15:38:23 +10:00
2018-07-18 15:14:45 +10:00
2018-06-13 09:46:13 +10:00
2014-05-30 14:26:21 +02:00
2018-05-18 15:38:23 +10:00
2016-09-09 16:18:07 +10:00
2018-05-17 16:36:56 +10:00
2018-01-21 22:43:43 +11:00
2018-05-18 15:38:23 +10:00
2018-05-18 15:38:23 +10:00
2017-11-02 11:10:55 +01:00
2018-06-14 17:42:54 +02:00
2018-05-18 15:38:23 +10:00
2018-05-18 15:38:23 +10:00
2018-07-26 15:38:41 +10:00
2018-02-01 13:35:33 +11:00
2017-03-02 08:42:38 +01:00
2015-12-01 13:52:25 +11:00
2017-10-14 16:38:19 +11:00
2018-06-13 09:45:28 +10:00
2018-01-10 03:07:30 +11:00
2017-04-27 21:37:29 +10:00
2018-06-01 10:29:42 +10:00
2018-01-22 05:48:33 +11:00
2017-04-27 21:37:29 +10:00
2018-05-18 15:38:23 +10:00
2018-07-26 13:23:52 +10:00
2018-01-19 12:10:21 +11:00
2018-06-13 09:45:28 +10:00
2018-06-01 10:30:39 +10:00
2018-05-18 15:38:23 +10:00
2014-07-28 15:23:15 +02:00
2018-05-18 15:38:23 +10:00
2014-09-22 10:11:32 +02:00
2014-09-22 10:11:36 +02:00
2018-05-18 15:38:23 +10:00
2018-05-22 19:51:08 +10:00
2013-01-24 19:23:33 +01:00
2018-05-18 15:38:23 +10:00
2017-08-31 12:36:44 +10:00
2016-01-15 17:56:32 -08:00
2017-08-31 12:36:44 +10:00
2018-07-18 15:14:45 +10:00
2018-04-01 00:47:50 +11:00
2010-09-02 14:07:32 +10:00
2017-11-02 11:10:55 +01:00
2018-02-09 22:03:06 +01:00
2018-05-31 11:35:12 +10:00
2016-12-24 11:46:01 -08:00
2018-07-18 15:14:45 +10:00
2018-01-11 20:36:06 +11:00
2014-07-28 19:29:15 +02:00
2018-06-01 10:30:43 +10:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-19 10:08:29 +11:00
2017-11-02 11:10:55 +01:00