Skip to contentSkip to conversation

KVM: indicate oom if add_buf fails

PATCH In review Bruce Rogers 2 participants 3 messages Jun 3, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 KVM: indicate oom if add_buf fails

This patch is a subset of an already upstream patch, but this portion is useful in earlier releases. Please consider for stable.

If the add_buf operation fails, indicate failure to the caller.

--- 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++;
#1 lore raw
Quoted 2 lines · Bruce Rogers

This patch is a subset of an already upstream patch, but this portion is useful in earlier releases. Please consider for stable.

WHat is the git commit id of the upstream patch?

I need that for all stable patches to be accepted, thanks.

Also, all KVM stuff needs to get acked by Avi, I can't take them until he says they are ok.

Oh, and what -stable trees do you want these patches in? .27, .32, .33, or .34? I have a bunch of them going at the moment...

thanks,

greg k-h

#2 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Greg KH

WHat is the git commit id of the upstream patch?

9ab86bbcf8be755256f0a5e994e0b38af6b4d399
I grabbed this from:
git://git.kernel.org/pub/scm/virt/kvm/kvm.git

Quoted 4 lines

I need that for all stable patches to be accepted, thanks.

Also, all KVM stuff needs to get acked by Avi, I can't take them until he says they are ok.

Understood.

Quoted 3 lines

Oh, and what -stable trees do you want these patches in? .27, .32, .33, or .34? I have a bunch of them going at the moment...

All 3 in 2.6.32, only #2 and #3 in 2.6.33, and only #3 in 2.6.34

Thanks,
Bruce