summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2013-06-17 12:09:59 -0700
committerDavid S. Miller <davem@davemloft.net>2013-06-17 15:55:47 -0700
commit7aa27238417a34ec9be2d8eff05ceff319f2d39b (patch)
tree27523a1ad89ecad7ac4e12627bd6cb43838144d6 /drivers/net
parent26a41ae604381c5cc0caf1c3261ca6b298b5fe69 (diff)
downloadlinux-7aa27238417a34ec9be2d8eff05ceff319f2d39b.tar.gz
linux-7aa27238417a34ec9be2d8eff05ceff319f2d39b.tar.bz2
linux-7aa27238417a34ec9be2d8eff05ceff319f2d39b.zip
vxlan: handle skb_clone failure
If skb_clone fails if out of memory then just skip the fanout. Problem was introduced in 3.10 with: commit 6681712d67eef14c4ce793561c3231659153a320 Author: David Stevens <dlstevens@us.ibm.com> Date: Fri Mar 15 04:35:51 2013 +0000 vxlan: generalize forwarding tables Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/vxlan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 15a73ec42c64..dda997a0102c 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1161,9 +1161,11 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
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);