• J
    x86/kvm: fix vcpu-id indexed array sizes · 76b4f357
    Juergen Gross 提交于
    KVM_MAX_VCPU_ID is the maximum vcpu-id of a guest, and not the number
    of vcpu-ids. Fix array indexed by vcpu-id to have KVM_MAX_VCPU_ID+1
    elements.
    
    Note that this is currently no real problem, as KVM_MAX_VCPU_ID is
    an odd number, resulting in always enough padding being available at
    the end of those arrays.
    
    Nevertheless this should be fixed in order to avoid rare problems in
    case someone is using an even number for KVM_MAX_VCPU_ID.
    Signed-off-by: NJuergen Gross <jgross@suse.com>
    Message-Id: <20210701154105.23215-2-jgross@suse.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    76b4f357
ioapic.c 19.6 KB