virtio_balloon: prevent pfn array overflow

[ Upstream commit 6e9826e772 ]

Make sure, at build time, that pfn array is big enough to hold a single
page.  It happens to be true since the PAGE_SHIFT value at the moment is
20, which is 1M - exactly 256 4K balloon pages.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Michael S. Tsirkin 2020-02-06 02:40:58 -05:00 • committed by Greg Kroah-Hartman
commit 2e8420b46f