summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2017-03-23 08:04:18 +0100
committerMichael S. Tsirkin <mst@redhat.com>2017-03-28 19:41:27 +0200
commitfc8653228c8588a120f6b5dad6983b7b61ff669e (patch)
tree93023e1808febcc42d14c19f9529e5b650fa21c1 /mm
parentvirtio_pci: fix out of bound access for msix_names (diff)
downloadlinux-fc8653228c8588a120f6b5dad6983b7b61ff669e.tar.xz
linux-fc8653228c8588a120f6b5dad6983b7b61ff669e.zip
virtio_balloon: init 1st buffer in stats vq
When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. Alternative fixes: * Push an empty buffer in init_vqs. Not easily done with the current virtio implementation and violates the spec "Driver MUST supply the same subset of statistics in all buffers submitted to the statsq". * Push a buffer with invalid tags in init_vqs. Violates the same spec clause, plus "invalid tag" is not really defined. Note: the spec says: When using the legacy interface, the device SHOULD ignore all values in the first buffer in the statsq supplied by the driver after device initialization. Note: Historically, drivers supplied an uninitialized buffer in the first buffer. Unfortunately QEMU does not seem to implement the recommendation even for the legacy interface. Cc: stable@vger.kernel.org Signed-off-by: Ladi Prosek <lprosek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions