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 51b19ebe4320f3dc, 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
..
2016-02-23 12:43:05 +00:00
2016-02-23 12:43:05 +00:00
2016-01-29 15:07:25 +00:00
2016-03-07 13:18:28 +01:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:25 +00:00
2016-03-07 13:26:29 +01:00
2016-01-29 15:07:25 +00:00
2016-03-04 11:30:17 +00:00
2016-01-29 15:07:24 +00:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:25 +00:00
2016-01-29 15:07:22 +00:00
2016-02-23 12:43:05 +00:00
2016-01-29 15:07:23 +00:00
2015-12-22 18:39:19 +02:00