qemu-patch-raspberry4/hw/usb
Laszlo Ersek 3afca1d6d4 vmstate_xhci_event: fix unterminated field list
"vmstate_xhci_event" was introduced in commit 37352df3 ("xhci: add live
migration support"), and first released in v1.6.0. The field list in this
VMSD is not terminated with the VMSTATE_END_OF_LIST() macro.

During normal use (ie. migration), the issue is practically invisible,
because the "vmstate_xhci_event" object (with the unterminated field list)
is only ever referenced -- via "vmstate_xhci_intr" -- if xhci_er_full()
returns true, for the "ev_buffer" test. Since that field_exists() check
(apparently) almost always returns false, we almost never traverse
"vmstate_xhci_event" during migration, which hides the bug.

However, Amit's vmstate checker forces recursion into this VMSD as well,
and the lack of VMSTATE_END_OF_LIST() breaks the field list terminator
check (field->name != NULL) in dump_vmstate_vmsd(). The result is
undefined behavior, which in my case translates to infinite recursion
(because the loop happens to overflow into "vmstate_xhci_intr", which then
links back to "vmstate_xhci_event").

Add the missing terminator.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-22 17:34:24 +01:00
..
bus.c usb: fix up post load checks 2014-05-14 15:24:52 +02:00
ccid-card-emulated.c ccid-card-emulated: use EventNotifier 2014-07-01 15:49:51 +02:00
ccid-card-passthru.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
ccid.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
combined-packet.c usb: Fix iovec memleak on combined-packet free 2013-09-19 11:28:40 +02:00
core.c usb: add usb_pick_speed 2014-06-02 16:29:00 +02:00
desc-msos.c usb: add CompatibleID support to msos 2014-04-22 12:40:57 +02:00
desc.c usb: add usb_pick_speed 2014-06-02 16:29:00 +02:00
desc.h usb: add CompatibleID support to msos 2014-04-22 12:40:57 +02:00
dev-audio.c usb: Remove magic constants from device bmAttributes 2014-02-18 15:39:12 +01:00
dev-bluetooth.c usb: Fix usb-bt-dongle initialization. 2014-07-01 13:26:37 +02:00
dev-hid.c usb: add input routing support for tablet and keyboard 2014-05-26 08:42:43 +02:00
dev-hub.c savevm: Remove all the unneeded version_minimum_id_old (usb) 2014-05-14 15:24:51 +02:00
dev-mtp.c mtp: linux guest detection fix. 2014-07-11 12:31:41 +02:00
dev-network.c - xhci improvements and fixes. 2014-02-20 15:25:05 +00:00
dev-serial.c usb: Remove magic constants from device bmAttributes 2014-02-18 15:39:12 +01:00
dev-smartcard-reader.c usb: Remove magic constants from device bmAttributes 2014-02-18 15:39:12 +01:00
dev-storage.c blockdev: Rename drive_init(), drive_uninit() to drive_new(), drive_del() 2014-06-16 17:23:19 +08:00
dev-uas.c usb: Remove magic constants from device bmAttributes 2014-02-18 15:39:12 +01:00
dev-wacom.c usb: Remove magic constants from device bmAttributes 2014-02-18 15:39:12 +01:00
hcd-ehci-pci.c savevm: Remove all the unneeded version_minimum_id_old (usb) 2014-05-14 15:24:51 +02:00
hcd-ehci-sysbus.c savevm: Remove all the unneeded version_minimum_id_old (usb) 2014-05-14 15:24:51 +02:00
hcd-ehci.c usb: move ehci register defines to header file 2014-06-02 16:28:59 +02:00
hcd-ehci.h trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies) 2013-12-02 21:02:00 +04:00
hcd-musb.c usb: Pass size to usb_bus_new() 2013-08-30 20:14:39 +02:00
hcd-ohci.c hw/usb: Add missing 'static' attribute 2014-07-18 17:45:37 +04:00
hcd-uhci.c usb: move uhci register defines to header file 2014-06-02 16:28:59 +02:00
hcd-xhci.c vmstate_xhci_event: fix unterminated field list 2014-07-22 17:34:24 +01:00
host-legacy.c qdev: Drop misleading qdev_free() function 2013-11-05 18:06:38 +01:00
host-libusb.c usb: initialize libusb_device to avoid crash 2014-07-01 13:26:37 +02:00
host-stub.c usb-host: remove usb_host_device_close 2013-02-19 12:30:05 +01:00
host.h usb-host: move legacy cmd line bits 2013-02-19 12:30:05 +01:00
libhw.c dma: eliminate DMAContext 2013-06-20 16:39:52 +02:00
Makefile.objs libcacard: remove libcacard-specific CFLAGS and LIBS from global vars 2014-05-09 22:59:40 +02:00
quirks-ftdi-ids.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks-pl2303-ids.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks.c usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
quirks.h usbredir: Add support for buffered bulk input (v2) 2013-01-08 10:56:58 +01:00
redirect.c serial: poll the serial console with G_IO_HUP 2014-06-30 15:04:34 +02:00