Commit c8ce057eafd49da6a7afe7791bd84163f65f6132
Committed by
Marcelo Tosatti
1 parent
676646ee4b
Exists in
master
and in
4 other branches
KVM: improve comment on rcu use in irqfd_deassign
The RCU use in kvm_irqfd_deassign is tricky: we have rcu_assign_pointer but no synchronize_rcu: synchronize_rcu is done by kvm_irq_routing_update which we share a spinlock with. Fix up a comment in an attempt to make this clearer. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
virt/kvm/eventfd.c
... | ... | @@ -313,8 +313,9 @@ |
313 | 313 | if (irqfd->eventfd == eventfd && irqfd->gsi == gsi) { |
314 | 314 | /* |
315 | 315 | * This rcu_assign_pointer is needed for when |
316 | - * another thread calls kvm_irqfd_update before | |
317 | - * we flush workqueue below. | |
316 | + * another thread calls kvm_irq_routing_update before | |
317 | + * we flush workqueue below (we synchronize with | |
318 | + * kvm_irq_routing_update using irqfds.lock). | |
318 | 319 | * It is paired with synchronize_rcu done by caller |
319 | 320 | * of that function. |
320 | 321 | */ |