summaryrefslogtreecommitdiff
path: root/virt/kvm/coalesced_mmio.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-04-12 15:20:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-14 09:50:04 +0200
commit03c6cccedd3913006744faa252a4da5145299343 (patch)
tree7b856a69c02dc39952341ecc47d2accff39b5314 /virt/kvm/coalesced_mmio.c
parentae996824da9b1315a5ce6e085660e2486ec06dc8 (diff)
KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU
commit 2ee3757424be7c1cd1d0bbfa6db29a7edd82a250 upstream. If allocating a new instance of an I/O bus fails when unregistering a device, wait to destroy the device until after all readers are guaranteed to see the new null bus. Destroying devices before the bus is nullified could lead to use-after-free since readers expect the devices on their reference of the bus to remain valid. Fixes: f65886606c2d ("KVM: fix memory leak in kvm_io_bus_unregister_dev()") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210412222050.876100-2-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt/kvm/coalesced_mmio.c')
0 files changed, 0 insertions, 0 deletions