* [PATCH 2/3][STABLE] KVM: indicate oom if add_buf fails
@ 2010-06-03 22:27 Bruce Rogers
0 siblings, 0 replies; only message in thread
From: Bruce Rogers @ 2010-06-03 22:27 UTC (permalink / raw)
To: rusty; +Cc: virtualization
This patch is a subset of an already upstream patch, but this portion is useful in earlier releases.
Please consider for the 2.6.32 and 2.6.33 stable trees.
If the add_buf operation fails, indicate failure to the caller.
Signed-off-by: Bruce Rogers <brogers@novell.com>
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -318,6 +318,7 @@ static bool try_fill_recv_maxbufs(struct
skb_unlink(skb, &vi->recv);
trim_pages(vi, skb);
kfree_skb(skb);
+ oom = true;
break;
}
vi->num++;
@@ -368,6 +369,7 @@ static bool try_fill_recv(struct virtnet
if (err < 0) {
skb_unlink(skb, &vi->recv);
kfree_skb(skb);
+ oom = true;
break;
}
vi->num++;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-03 22:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-03 22:27 [PATCH 2/3][STABLE] KVM: indicate oom if add_buf fails Bruce Rogers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox