summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2017-07-06 20:31:11 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-07 15:24:15 +0200
commit5535f800b0e1533e5f3a1428f6ef25eb29eccc0f (patch)
tree98aa5a717db281a48dc3b794dd5af16f24b844e1 /virt
parent0e4524a5d341e719e8ee9ee7db5d58e2c5a4c10e (diff)
downloadblackbird-obmc-linux-5535f800b0e1533e5f3a1428f6ef25eb29eccc0f.tar.gz
blackbird-obmc-linux-5535f800b0e1533e5f3a1428f6ef25eb29eccc0f.zip
KVM: use rcu access function for irq routing
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 <borntraeger@de.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/irqchip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c
index 31e40c9e81df..b1286c4e0712 100644
--- a/virt/kvm/irqchip.c
+++ b/virt/kvm/irqchip.c
@@ -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);
OpenPOWER on IntegriCloud