Files
android_kernel_xiaomi_sm8450/arch/powerpc/include/asm
Paul Mackerras 1659e27d2b KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list
Currently the Book 3S KVM code uses kvm->lock to synchronize access
to the kvm->arch.rtas_tokens list.  Because this list is scanned
inside kvmppc_rtas_hcall(), which is called with the vcpu mutex held,
taking kvm->lock cause a lock inversion problem, which could lead to
a deadlock.

To fix this, we add a new mutex, kvm->arch.rtas_token_lock, which nests
inside the vcpu mutexes, and use that instead of kvm->lock when
accessing the rtas token list.

This removes the lockdep_assert_held() in kvmppc_rtas_tokens_free().
At this point we don't hold the new mutex, but that is OK because
kvmppc_rtas_tokens_free() is only called when the whole VM is being
destroyed, and at that point nothing can be looking up a token in
the list.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-05-29 13:44:36 +10:00
..
2019-02-22 00:10:14 +11:00
2018-06-03 20:32:02 +10:00
2019-01-14 20:39:27 +11:00
2019-02-23 22:31:40 +11:00
2019-05-03 01:20:26 +10:00
2019-05-03 01:20:24 +10:00
2019-05-03 01:20:24 +10:00
2019-02-18 22:41:03 +11:00
2019-05-03 01:20:25 +10:00
2018-09-18 17:52:15 -05:00
2018-05-25 12:04:43 +10:00
2018-06-03 21:19:40 +10:00
2018-07-30 22:48:21 +10:00
2019-05-01 16:45:05 +10:00
2017-11-12 09:03:10 +11:00