aboutsummaryrefslogtreecommitdiff
path: root/CREDITS
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-12-26 12:03:17 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-12-27 06:01:49 -0500
commit70eae03087a3101493d9a1cf60c86c5f65600822 (patch)
treea980cfdcdcb5f4ac71a99f9a932a1fad80117f3c /CREDITS
parent92c58965e9656dc6e682a8ffe520fac0fb256d13 (diff)
KVM: x86/xen: Fix SRCU/RCU usage in readers of evtchn_ports
The evtchnfd structure itself must be protected by either kvm->lock or SRCU. Use the former in kvm_xen_eventfd_update(), since the lock is being taken anyway; kvm_xen_hcall_evtchn_send() instead is a reader and does not need kvm->lock, and is called in SRCU critical section from the kvm_x86_handle_exit function. It is also important to use rcu_read_{lock,unlock}() in kvm_xen_hcall_evtchn_send(), because idr_remove() will *not* use synchronize_srcu() to wait for readers to complete. Remove a superfluous if (kvm) check before calling synchronize_srcu() in kvm_xen_eventfd_deassign() where kvm has been dereferenced already. Co-developed-by: Michal Luczaj <mhal@rbox.co> Signed-off-by: Michal Luczaj <mhal@rbox.co> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Message-Id: <20221226120320.1125390-3-dwmw2@infradead.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions