linux/include
David Hildenbrand 07882feab4 KVM: kvm_io_bus_unregister_dev() should never fail
commit 90db10434b upstream.

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")
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-04-22 07:15:03 +02:00
..
acpi ACPICA: Tables: Fix an issue that FACS initialization is performed twice 2015-08-04 14:33:56 -04:00
asm-generic asm-generic: make get_user() clear the destination on errors 2016-10-05 22:40:20 -04:00
clocksource ARM: pxa: Add non device-tree timer link to clocksource 2014-07-23 12:02:39 +02:00
crypto crypto: ahash - Fix EINPROGRESS notification callback 2017-04-22 07:15:01 +02:00
drm drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces 2017-04-22 07:14:59 +02:00
dt-bindings The fixes for the clock framework are all regressions in drivers, plus a 2014-11-25 17:52:56 -08:00
keys KEYS: Restore partial ID matching functionality for asymmetric keys 2014-10-06 15:21:05 +01:00
kvm arm/arm64: KVM: Keep elrsr/aisr in sync with software model 2015-05-11 07:07:37 -04:00
linux KVM: kvm_io_bus_unregister_dev() should never fail 2017-04-22 07:15:03 +02:00
math-emu math-emu: fix floating-point to integer overflow detection 2014-01-07 18:36:24 -06:00
media Merge branch 'patchwork' into v4l_for_linus 2014-10-09 14:00:54 -03:00
memory ddr: add LPDDR2 data from JESD209-2 2012-05-02 00:04:06 -07:00
misc cxl: Add new header for call backs and structs 2014-10-08 20:15:43 +11:00
net netlabel: out of bound access in cipso_v4_validate() 2017-04-18 07:55:44 +02:00
pcmcia pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate 2013-03-15 12:26:03 -07:00
ras PCI/AER: Rename PCI_ERR_UNC_TRAIN to PCI_ERR_UNC_UND 2014-09-25 09:42:40 -06:00
rdma IB/cma: Fix a race condition in iboe_addr_get_sgid() 2017-01-15 09:49:52 -05:00
rxrpc include/rxrpc/types.h: Remove unused header 2014-08-29 20:33:39 -07:00
scsi scsi: libiscsi: add lock around task lists to fix list corruption regression 2017-04-22 07:15:01 +02:00
soc/tegra ARM: tegra: Convert PMC to a driver 2014-07-17 14:58:43 +02:00
sound ALSA: pcm: More kerneldoc updates 2016-03-04 10:18:43 -05:00
target target: Fix remote-port TMR ABORT + se_cmd fabric stop 2016-03-05 22:13:44 -05:00
trace tracing: Add #undef to fix compile error 2017-04-18 07:55:51 +02:00
uapi uapi: fix linux/packet_diag.h userspace compilation error 2017-04-18 07:55:54 +02:00
video fbdev changes for 3.18 2014-10-18 18:03:02 -07:00
xen x86/xen: Support kexec/kdump in HVM guests by doing a soft reset 2015-10-27 22:13:13 -04:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00