• Paolo Bonzini's avatar
    KVM: X86: fix lazy allocation of rmaps · fa13843d
    Paolo Bonzini authored
    If allocation of rmaps fails, but some of the pointers have already been written,
    those pointers can be cleaned up when the memslot is freed, or even reused later
    for another attempt at allocating the rmaps.  Therefore there is no need to
    WARN, as done for example in memslot_rmap_alloc, but the allocation *must* be
    skipped lest KVM will overwrite the previous pointer and will indeed leak memory.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    fa13843d
x86.c 324 KB