• Alex Williamson's avatar
    KVM: Fix user memslot overlap check · 5419369e
    Alex Williamson authored
    Prior to memory slot sorting this loop compared all of the user memory
    slots for overlap with new entries.  With memory slot sorting, we're
    just checking some number of entries in the array that may or may not
    be user slots.  Instead, walk all the slots with kvm_for_each_memslot,
    which has the added benefit of terminating early when we hit the first
    empty slot, and skip comparison to private slots.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    5419369e
kvm_main.c 65.6 KB