aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2010-04-21 22:52:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-22 10:34:05 -0400
commit61fb06cc8e68906fb29d67bd5b6c2d50a95fc9e5 (patch)
tree0019a4794e8060f9c71a4cf6d6a712e204f3e5a7 /drivers/virtio
parentb7b6cf005b59ff5a4dba10338954c3dcfc75ef7b (diff)
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 <balbir@linux.vnet.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: kvm <kvm@vger.kernel.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_balloon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 3aed38886f94..bfec7c29486d 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)
103 num = min(num, ARRAY_SIZE(vb->pfns)); 103 num = min(num, ARRAY_SIZE(vb->pfns));
104 104
105 for (vb->num_pfns = 0; vb->num_pfns < num; vb->num_pfns++) { 105 for (vb->num_pfns = 0; vb->num_pfns < num; vb->num_pfns++) {
106 struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY); 106 struct page *page = alloc_page(GFP_HIGHUSER | __GFP_NORETRY |
107 __GFP_NOMEMALLOC | __GFP_NOWARN);
107 if (!page) { 108 if (!page) {
108 if (printk_ratelimit()) 109 if (printk_ratelimit())
109 dev_printk(KERN_INFO, &vb->vdev->dev, 110 dev_printk(KERN_INFO, &vb->vdev->dev,