android_kernel_samsung_a7y1.../arch
Paul Mackerras 1b1b401f4c KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list
[ Upstream commit 1659e27d2bc1ef47b6d031abe01b467f18cb72d9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-06 19:04:35 +02:00
..
alpha A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
arc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
arm ARM: exynos: Fix undefined instruction during Exynos5422 resume 2020-04-06 19:02:44 +02:00
arm64 arm64: cpu_ops: fix a leaked reference by adding missing of_node_put 2020-04-06 18:19:54 +02:00
avr32 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
blackfin A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
c6x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cris A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
frv A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2020-04-06 14:21:05 +02:00
hexagon A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ia64 ia64: fix build errors by exporting paddr_to_nid() 2020-04-06 19:04:33 +02:00
m32r A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
m68k A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
metag A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
microblaze A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mips MIPS: pistachio: Build uImage.gz by default 2020-04-06 18:45:16 +02:00
mn10300 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nios2 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
openrisc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parisc A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
powerpc KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list 2020-04-06 19:04:35 +02:00
s390 KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION 2020-04-06 19:03:20 +02:00
score A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sparc sparc64: Fix regression in non-hypervisor TLB flush xcall 2020-04-06 18:21:00 +02:00
tile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
um A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unicore32 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
x86 x86/CPU/AMD: Don't force the CPB cap when running under a hypervisor 2020-04-06 19:03:50 +02:00
xtensa xtensa: fix return_address 2020-04-06 15:16:44 +02:00
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30