kernel-ark/drivers/virtio
Luiz Capitulino 8c6bab4f38 virtio_balloon: leak_balloon(): only tell host if we got pages deflated
balloon_page_dequeue() can return NULL.  If it does for the first page
being freed then leak_balloon() will create a scatter list with len=0.
Which in turn seems to generate an invalid virtio request.

I didn't get this in practice, I found it by code review.  On the other
hand, such an invalid virtio request will cause errors in QEMU and
fill_balloon() also performs the same check implemented by this commit.

This bug was introduced in e2250429.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Acked-by: Rafael Aquini <aquini@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org # 3.9
2013-07-02 15:42:03 +09:30
..
config.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig drivers/virtio: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:39:04 -08:00
Makefile virtio: remove CONFIG_VIRTIO_RING 2012-09-28 15:05:15 +09:30
virtio_balloon.c virtio_balloon: leak_balloon(): only tell host if we got pages deflated 2013-07-02 15:42:03 +09:30
virtio_mmio.c virtio: make config_ops const 2013-02-11 15:32:17 +10:30
virtio_pci.c virtio-pci: fix leaks of msix_affinity_masks 2013-07-02 15:42:02 +09:30
virtio_ring.c virtio: remove virtqueue_add_buf(). 2013-05-20 12:16:01 +09:30
virtio.c Some nice cleanups, and even a patch my wife did as a "live" demo for 2012-12-20 08:37:05 -08:00