Skip to content

Commit

Permalink
vxlan: handle skb_clone failure
Browse files Browse the repository at this point in the history
If skb_clone fails if out of memory then just skip the fanout.

Problem was introduced in 3.10 with:
  commit 6681712
  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>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jun 17, 2013
1 parent 26a41ae commit 7aa2723
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7aa2723

Please sign in to comment.