linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RESEND]Fix GFP flags passed from the virtio balloon driver
@ 2010-04-21 19:07 Balbir Singh
  2010-04-22  2:52 ` [PATCH] virtio: Fix " Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: Balbir Singh @ 2010-04-21 19:07 UTC (permalink / raw)
  To: kvm; +Cc: Rusty Russell, Avi Kivity, linux-mm@kvack.org

Fix GFP flags passed from the virtio balloon driver

From: Balbir Singh <balbir@linux.vnet.ibm.com>

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 avoids printing a warning if allocation
fails.

Comments?

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
---

 drivers/virtio/virtio_balloon.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 369f2ee..f8ffe8c 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -102,7 +102,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,

-- 
	Three Cheers,
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-22  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-21 19:07 [PATCH][RESEND]Fix GFP flags passed from the virtio balloon driver Balbir Singh
2010-04-22  2:52 ` [PATCH] virtio: Fix " Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).