WSL2-Linux-Kernel/include
David Hildenbrand 90db10434b KVM: kvm_io_bus_unregister_dev() should never fail
No caller currently checks the return value of
kvm_io_bus_unregister_dev(). This is evil, as all callers silently go on
freeing their device. A stale reference will remain in the io_bus,
getting at least used again, when the iobus gets teared down on
kvm_destroy_vm() - leading to use after free errors.

There is nothing the callers could do, except retrying over and over
again.

So let's simply remove the bus altogether, print an error and make
sure no one can access this broken bus again (returning -ENOMEM on any
attempt to access it).

Fixes: e93f8a0f82 ("KVM: convert io_bus to SRCU")
Cc: stable@vger.kernel.org # 3.4+
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-03-23 19:02:25 +01:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings
keys
kvm
linux KVM: kvm_io_bus_unregister_dev() should never fail 2017-03-23 19:02:25 +01:00
math-emu
media
memory
misc
net
pcmcia
ras
rdma
rxrpc
scsi
soc
sound
target target: fix ALUA transition timeout handling 2017-03-18 14:47:28 -07:00
trace
uapi amd, intel, tilcdc, omap, and malidp fixes. 2017-03-17 11:19:52 -07:00
video
xen
Kbuild