All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH net v2 02/03] vxlan: handle skb_clone failure
Date: Mon, 10 Jun 2013 13:12:30 -0700	[thread overview]
Message-ID: <20130610131230.486f43fc@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20130610195822.888424947@vyatta.com>

skb_clone can fail if out of memory. Just skip the fanout.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---
The multi-destination was added in 3.10, does not need to goto stable

--- a/drivers/net/vxlan.c	2013-06-06 08:29:07.890429399 -0700
+++ b/drivers/net/vxlan.c	2013-06-06 09:38:52.723669153 -0700
@@ -1198,9 +1198,11 @@ static netdev_tx_t vxlan_xmit(struct sk_
 		struct sk_buff *skb1;
 
 		skb1 = skb_clone(skb, GFP_ATOMIC);
-		rc1 = vxlan_xmit_one(skb1, dev, rdst, did_rsc);
-		if (rc == NETDEV_TX_OK)
-			rc = rc1;
+		if (skb1) {
+			rc1 = vxlan_xmit_one(skb1, dev, rdst, did_rsc);
+			if (rc == NETDEV_TX_OK)
+				rc = rc1;
+		}
 	}
 
 	rc1 = vxlan_xmit_one(skb, dev, rdst0, did_rsc);

       reply	other threads:[~2013-06-10 20:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130610195822.888424947@vyatta.com>
2013-06-10 20:12 ` Stephen Hemminger [this message]
2013-06-10 21:01   ` [PATCH net v2 02/03] vxlan: handle skb_clone failure David Miller
2013-06-10 20:13 ` [PATCH net v2 03/03] [PATCH] vxlan: fix crash on module removal Stephen Hemminger
2013-06-10 21:01   ` David Miller
2013-06-10 21:14     ` David Miller
2013-06-10 21:18       ` David Miller
2013-06-10 21:48         ` Stephen Hemminger
2013-06-11  4:10           ` David Miller
2013-06-10 20:13 ` [PATCH net v2 01/03] vxlan: only migrate dynamic FDB entries Stephen Hemminger
2013-06-10 20:27   ` Sergei Shtylyov
2013-06-10 20:32     ` Stephen Hemminger
2013-06-10 20:42       ` David Miller
2013-06-10 21:00   ` David Miller

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=20130610131230.486f43fc@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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 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.