diff options
| author | Paul Mackerras <[email protected]> | 2019-05-23 06:36:32 +0000 |
|---|---|---|
| committer | Paul Mackerras <[email protected]> | 2019-05-29 03:44:36 +0000 |
| commit | 5a3f49364c3ffa1107bd88f8292406e98c5d206c (patch) | |
| tree | eeb628b3b6b559ecec9a7ab1d4f0323ff0f31252 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list (diff) | |
| download | kernel-5a3f49364c3ffa1107bd88f8292406e98c5d206c.tar.gz kernel-5a3f49364c3ffa1107bd88f8292406e98c5d206c.zip | |
KVM: PPC: Book3S HV: Don't take kvm->lock around kvm_for_each_vcpu
Currently the HV KVM code takes the kvm->lock around calls to
kvm_for_each_vcpu() and kvm_get_vcpu_by_id() (which can call
kvm_for_each_vcpu() internally). However, that leads to a lock
order inversion problem, because these are called in contexts where
the vcpu mutex is held, but the vcpu mutexes nest within kvm->lock
according to Documentation/virtual/kvm/locking.txt. Hence there
is a possibility of deadlock.
To fix this, we simply don't take the kvm->lock mutex around these
calls. This is safe because the implementations of kvm_for_each_vcpu()
and kvm_get_vcpu_by_id() have been designed to be able to be called
locklessly.
Signed-off-by: Paul Mackerras <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
