qemu/hw/virtio
Ladi Prosek 4eae2a657d balloon: fix segfault and harden the stats queue
The segfault here is triggered by the driver notifying the stats queue
twice after adding a buffer to it. This effectively resets stats_vq_elem
back to NULL and QEMU crashes on the next stats timer tick in
balloon_stats_poll_cb.

This is a regression introduced in 51b19ebe43, although admittedly
the device assumed too much about the stats queue protocol even before
that commit. This commit adds a few more checks and ensures that the one
stats buffer gets deallocated on device reset.

Cc: qemu-stable@nongnu.org
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-03-11 14:54:28 +02:00
..
Makefile.objs vring: remove 2016-02-25 13:14:19 +02:00
vhost-backend.c virtio: Clean up includes 2016-01-29 15:07:23 +00:00
vhost-user.c vhost-user: don't merge regions with different fds 2016-02-23 12:55:16 +02:00
vhost.c vhost-user: don't merge regions with different fds 2016-02-23 12:55:16 +02:00
virtio-balloon.c balloon: fix segfault and harden the stats queue 2016-03-11 14:54:28 +02:00
virtio-bus.c virtio: Clean up includes 2016-01-29 15:07:23 +00:00
virtio-mmio.c virtio: Clean up includes 2016-01-29 15:07:23 +00:00
virtio-pci.c vhost-user interrupt management fixes 2016-02-18 16:13:56 +02:00
virtio-pci.h 9pfs: introduce V9fsVirtioState 2016-01-12 11:04:14 +05:30
virtio-rng.c virtio-rng: ask for more data if queue is not fully drained 2016-03-03 17:42:26 +05:30
virtio.c virtio: export vring_notify as virtio_should_notify 2016-02-25 13:14:18 +02:00