• Paolo Bonzini's avatar
    KVM: fix OOPS on flush_work · 36343f6e
    Paolo Bonzini authored
    The conversion done by commit 3706feac ("KVM: Remove deprecated
    create_singlethread_workqueue") is broken.  It flushes a single work
    item &irqfd->shutdown instead of all of them, and even worse if there
    is no irqfd on the list then you get a NULL pointer dereference.
    Revert the virt/kvm/eventfd.c part of that patch; to avoid the
    deprecated function, just allocate our own workqueue---it does
    not even have to be unbound---with alloc_workqueue.
    
    Fixes: 3706feacReviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    36343f6e
kvm_main.c 92 KB