Skip to content

Commit

Permalink
KVM: use rcu access function for irq routing
Browse files Browse the repository at this point in the history
irq routing is rcu protected. Use the proper access functions.
Found by sparse

virt/kvm/irqchip.c:233:13: warning: incorrect type in assignment (different address spaces)
virt/kvm/irqchip.c:233:13:    expected struct kvm_irq_routing_table *old
virt/kvm/irqchip.c:233:13:    got struct kvm_irq_routing_table [noderef] <asn:4>*irq_routing

Signed-off-by: Christian Borntraeger <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
  • Loading branch information
borntraeger committed Jul 7, 2017
1 parent 0e4524a commit 5535f80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/irqchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int kvm_set_irq_routing(struct kvm *kvm,
}

mutex_lock(&kvm->irq_lock);
old = kvm->irq_routing;
old = rcu_dereference_protected(kvm->irq_routing, 1);
rcu_assign_pointer(kvm->irq_routing, new);
kvm_irq_routing_update(kvm);
kvm_arch_irq_routing_update(kvm);
Expand Down

0 comments on commit 5535f80

Please sign in to comment.