]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: hyperv: idr_find needs RCU protection
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 May 2018 17:24:34 +0000 (19:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 May 2018 09:21:11 +0000 (11:21 +0200)
commit75090af58ca91e48b4d28595c9da75cc2b81a603
treecd20a5942452373352c9861437b13f0eb58f94fe
parent3da1ec765d75c03579a10bf816bb8f35e9df9979
KVM: hyperv: idr_find needs RCU protection

Even though the eventfd is released after the KVM SRCU grace period
elapses, the conn_to_evt data structure itself is not; it uses RCU
internally, instead.  Fix the read-side critical section to happen
under rcu_read_lock/unlock; the result is still protected by
vcpu->kvm->srcu.

Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c