All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio_net: indicate oom when addbuf returns failure
@ 2010-06-04  0:58 Rusty Russell
  2010-06-04 16:05 ` [stable] " Greg KH
  2010-06-06 20:13 ` Michael S. Tsirkin
  0 siblings, 2 replies; 12+ messages in thread
From: Rusty Russell @ 2010-06-04  0:58 UTC (permalink / raw)
  To: stable; +Cc: Bruce Rogers, Michael S. Tsirkin, Herbert Xu, netdev

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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

--- 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] 12+ messages in thread

end of thread, other threads:[~2010-06-10 15:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-04  0:58 [PATCH] virtio_net: indicate oom when addbuf returns failure Rusty Russell
2010-06-04 16:05 ` [stable] " Greg KH
2010-06-06 20:13 ` Michael S. Tsirkin
2010-06-06 22:24   ` Herbert Xu
2010-06-07  2:24     ` Rusty Russell
2010-06-07  2:24     ` Rusty Russell
2010-06-07  9:15     ` Michael S. Tsirkin
2010-06-06 22:24   ` Herbert Xu
2010-06-07  2:17   ` Rusty Russell
2010-06-07  2:17   ` Rusty Russell
2010-06-10 15:46   ` Bruce Rogers
2010-06-10 15:46   ` Bruce Rogers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.