linux/drivers/virtio
Konstantin Neumoin 0335e86fe1 balloon: check the number of available pages in leak balloon
[ Upstream commit 37cf99e08c ]

The balloon has a special mechanism that is subscribed to the oom
notification which leads to deflation for a fixed number of pages.
The number is always fixed even when the balloon is fully deflated.
But leak_balloon did not expect that the pages to deflate will be more
than taken, and raise a "BUG" in balloon_page_dequeue when page list
will be empty.

So, the simplest solution would be to check that the number of releases
pages is less or equal to the number taken pages.

Cc: stable@vger.kernel.org
Signed-off-by: Konstantin Neumoin <kneumoin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
History 2016-08-22 12:23:26 -04:00
..
config.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig mm/balloon_compaction: add vmstat counters and kpageflags bit 2014-10-09 22:26:01 -04:00
Makefile virtio: remove CONFIG_VIRTIO_RING 2012-09-28 15:05:15 +09:30
virtio.c virtio: defer config changed notifications 2014-10-15 10:24:56 +10:30
virtio_balloon.c balloon: check the number of available pages in leak balloon 2016-08-22 12:23:26 -04:00
virtio_mmio.c virtio: unify config_changed handling 2014-10-15 10:24:54 +10:30
virtio_pci.c virtio-pci: move freeze/restore to virtio core 2014-10-15 10:24:55 +10:30
virtio_ring.c virtio_ring: unify direct/indirect code paths. 2014-09-13 12:52:35 -04:00