Alexey Kardashevskiy ddfd151f3d KVM: PPC: Book3S: Fix incorrect guest-to-user-translation error handling
H_PUT_TCE_INDIRECT handlers receive a page with up to 512 TCEs from
a guest. Although we verify correctness of TCEs before we do anything
with the existing tables, there is a small window when a check in
kvmppc_tce_validate might pass and right after that the guest alters
the page of TCEs, causing an early exit from the handler and leaving
srcu_read_lock(&vcpu->kvm->srcu) (virtual mode) or lock_rmap(rmap)
(real mode) locked.

This fixes the bug by jumping to the common exit code with an appropriate
unlock.

Cc: stable@vger.kernel.org # v4.11+
Fixes: 121f80ba68f1 ("KVM: PPC: VFIO: Add in-kernel acceleration for VFIO")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-08-27 10:59:30 +10:00
..
2019-07-19 12:15:33 -07:00
2019-07-17 09:36:38 -07:00
2019-07-11 10:09:44 -07:00
2019-08-09 16:53:39 +02:00
2019-07-16 19:23:24 -07:00
2019-07-12 15:38:05 -07:00
2019-07-20 09:34:55 -07:00
2019-08-09 16:53:39 +02:00
2019-07-20 09:34:55 -07:00
2019-07-12 16:06:27 -07:00