Linux virtualization list
 help / color / mirror / Atom feed
From: "Bruce Rogers" <brogers@novell.com>
To: rusty@rustcorp.com.au
Cc: virtualization@linux-foundation.org
Subject: [PATCH 2/3][STABLE] KVM: indicate oom if add_buf fails
Date: Thu, 03 Jun 2010 16:27:24 -0600	[thread overview]
Message-ID: <4C07D7EC0200004800097507@sinclair.provo.novell.com> (raw)

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++;

                 reply	other threads:[~2010-06-03 22:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C07D7EC0200004800097507@sinclair.provo.novell.com \
    --to=brogers@novell.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox