From: Balbir Singh Date: Thu, 22 Apr 2010 02:52:34 +0000 (+0930) Subject: virtio: Fix GFP flags passed from the virtio balloon driver X-Git-Tag: v2.6.34-rc6~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61fb06cc8e68906fb29d67bd5b6c2d50a95fc9e5;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git virtio: Fix GFP flags passed from the virtio balloon driver The virtio balloon driver can dig into the reservation pools of the OS to satisfy a balloon request. This is not advisable and other balloon drivers (drivers/xen/balloon.c) avoid this as well. The patch also adds changes to avoid printing a warning if allocation fails, since we retry after sometime anyway. Signed-off-by: Balbir Singh Signed-off-by: Rusty Russell Cc: kvm Cc: stable@kernel.org Signed-off-by: Linus Torvalds --- diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 3aed388..bfec7c2 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -103,7 +103,8 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num) num = min(num, ARRAY_SIZE(vb->pfns)); for (vb->num_pfns = 0; vb->num_pfns < num; vb->num_pfns++) { - struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY); + struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY | + __GFP_NOMEMALLOC | __GFP_NOWARN); if (!page) { if (printk_ratelimit()) dev_printk(KERN_INFO, &vb->vdev->dev,