Skip to content
  • Michael S. Tsirkin's avatar
    kvm: zero-initialize KVM_SET_GSI_ROUTING input · 0fbc2074
    Michael S. Tsirkin authored
    
    
    kvm_add_routing_entry makes an attempt to
    zero-initialize any new routing entry.
    However, it fails to initialize padding
    within the u field of the structure
    kvm_irq_routing_entry.
    
    Other functions like kvm_irqchip_update_msi_route
    also fail to initialize the padding field in
    kvm_irq_routing_entry.
    
    It's better to just make sure all input is initialized.
    
    Once it is, we can also drop complex field by field assignment and just
    do the simple *a = *b to update a route entry.
    
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
    0fbc2074